allhellno Posted May 21, 2016 Share Posted May 21, 2016 Hello everyone, I am currently trying to find a method for returning only select template files, for instance header.tpl I have noticed that WHMCS_ClientArea::output() and ClientArea::output() cause execution to stop (exit()??) So after further trying I have found that I can get individual templates compiled using ClientArea::getSingleTPLOutput() and WHMCS_ClientArea::getSingleTPLOutput(); However, fetching a TPL file with these methods leaves a lot of things undefined. Is there a list of templatevars that I can set to make these pages operate properly, similar to how the output method works? I have compared the two side by side and output() does perform some additional steps that I am missing, it has more defined classes/included files and a filled out templatevars array. here is my current work: <?php use WHMCS\ClientArea; use WHMCS\Database\Capsule; define('CLIENTAREA', true); require __DIR__ . '/init.php'; require __DIR__ . "/includes/clientfunctions.php"; require __DIR__ . "/includes/gatewayfunctions.php"; require __DIR__ . "/includes/ccfunctions.php"; require __DIR__ . "/includes/domainfunctions.php"; require __DIR__ . "/includes/registrarfunctions.php"; require __DIR__ . "/includes/customfieldfunctions.php"; require __DIR__ . "/includes/invoicefunctions.php"; require __DIR__ . "/includes/configoptionsfunctions.php"; $ca = new ClientArea(); echo $ca->getSingleTPLOutput('/templates/six/wp_header.tpl', $ca->getTemplateVars()); 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.