This request is a way to change the template folder in API, something like this:
$ca->setTemplate( 'my-new-template-file' , 'my-new-template-folder' );
Sometimes we need to create landing pages, or another way to show the products. And we want a clean template, without to many information at header and footer.
If this implemented we could have a template for each kind of products o advirtesiment , and stop using smarttemplate conditions at header and footer.
3 Comments
Login to post a comment.
<?php
use WHMCS\Database\Capsule;
use WHMCS\View\Menu\Item as MenuItem;
define("CLIENTAREA", true);
// Set the template you want to use for the custom page BEFORE init.php is called
$GLOBALS['_REQUEST']['systpl'] = 'five';
require("init.php");
...
// WHATEVER YOU ARE DOING IN HERE
...
// Set the session back to the default template:
$GLOBALS['_SESSION']['Template'] = 'six';
$ca->output();
http://www.smarty.net/docsv2/en/template.resources.tpl#templates.from.any.dir
From this way, the header and footer still comming from the default template.