Difference between revisions of "Creating Pages"

From WHMCS Documentation

(Replaced content with "For the latest recommend method for creating pages, please visit https://developers.whmcs.com/advanced/creating-pages/")
 
(43 intermediate revisions by 11 users not shown)
Line 1: Line 1:
To add your own pages to the WHMCS system which utilise the WHMCS templating system, you may use the following code. This code is designed to work with files placed in the root whmcs directory.  
+
For the latest recommend method for creating pages, please visit https://developers.whmcs.com/advanced/creating-pages/
 
 
<?php
 
 
 
define("CLIENTAREA",true);
 
 
 
require("dbconnect.php");
 
require("includes/functions.php");
 
 
 
$pagetitle = $_LANG['clientareatitle'];
 
$pageicon = "images/support/clientarea.gif";
 
$breadcrumbnav=''.$_LANG['globalsystemname'].'';
 
 
 
require("init.php");
 
 
 
if ($_SESSION['loggedinstatus']=="true") {
 
 
 
<nowiki>#</nowiki> User is Logged In - put any code you like here
 
 
 
}
 
 
 
<nowiki>#</nowiki> Define the template filename to be used without the .tpl extension
 
 
 
$templatefile = "homepage";
 
 
 
<nowiki>#</nowiki> To assign variables in Smarty use the following syntax. This can then be used as {$variablename} in the template
 
 
 
$smartyvalues["variablename"] = $value;
 
 
 
include("display.php");
 
 
 
?>
 

Latest revision as of 18:14, 28 January 2017

For the latest recommend method for creating pages, please visit https://developers.whmcs.com/advanced/creating-pages/