Difference between revisions of "Creating Pages"
From WHMCS Documentation
m (Reverted edits by 62.38.243.20 (Talk); changed back to last version by Matt) |
|||
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. This is ideal for adding custom pages to the client area or building an entire site around your WHMCS system. | 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. This is ideal for adding custom pages to the client area or building an entire site around your WHMCS system. | ||
− | + | ||
<?php | <?php |
Revision as of 15:15, 20 March 2008
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. This is ideal for adding custom pages to the client area or building an entire site around your WHMCS system.
<?php define("CLIENTAREA",true); require("dbconnect.php"); require("includes/functions.php"); $pagetitle = $_LANG['clientareatitle']; $pageicon = "images/support/clientarea.gif"; $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a> > <a href="mypage.php">My Page</a>'; require("init.php"); if ($_SESSION['uid']) { # User is Logged In - put any code you like here } # Define the template filename to be used without the .tpl extension $templatefile = "homepage"; # To assign variables in Smarty use the following syntax. This can then be used as {$variablename} in the template $smartyvalues["variablename"] = $value; require("display.php"); ?>