First of all the goal is to create a new whole php file/page on the admin page through addon module because from the _output()
function, whmcs will insert header, sidebar and footer and AFAIK, we cannot remove it.
The workaround I've done is to create a new PHP file from my custom addon module, thus a (whole) new page is created but the issue is cannot access WHMCS's constants, autoloader, like namespacing stuff, etc because the file is accessed directly. In the browser, I access it on this url: {rooturl}/modules/addons/my_custom_addon_module/pages/my_page.php
To get an idea, this is a basic structure of the file (smarty template):
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<span>{$myVar}</span>
</body>
</html>
What's the best solution for this?