japes Posted April 25, 2019 Share Posted April 25, 2019 Hopefully a stupid question, I have very little experience working with WHMCS and joined this project after it's been mostly set up I need to load a template file for my "about.php" page. The template is "about.tpl". How are these .php pages set up initially with the encoded php and how can I load my template whenever someone visits the about page? 0 Quote Link to comment Share on other sites More sharing options...
NadalKumar Posted April 25, 2019 Share Posted April 25, 2019 Take a look at the creating pages guide https://developers.whmcs.com/advanced/creating-pages/ 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 26, 2019 Share Posted April 26, 2019 19 hours ago, japes said: How are these .php pages set up initially with the encoded php and how can I load my template whenever someone visits the about page? assuming there are no existing sidebars to be added, and you're not checking the users loggedin status, that example on the docs page can be simplified to... <?php use WHMCS\ClientArea; define('CLIENTAREA', true); require __DIR__ . '/init.php'; $ca = new ClientArea(); $ca->setPageTitle('Your Page Title Goes Here'); $ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname')); $ca->addToBreadCrumb('about.php', 'Your Custom Page Name'); $ca->initPage(); $ca->setTemplate('about'); $ca->output(); it assumes that the about.tpl template is in your active template folder (e.g Six if you aren't using a custom theme). 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.