dannzegos Posted January 17, 2008 Share Posted January 17, 2008 Here is my question... I've added a new entry (Custom Web Development) in homepage.tpl (using portal template) and I've added the link to "CustomWebDev.php". When you click on the link it shows the page, but it does not have the portal template header and footer. I know how to do the include if it was in php, but not sure about tpl. How do I make my page to include the header.tpl and footer.tpl files? You help would be greatly appreciated. Thanks in advance, DannZegos 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted January 17, 2008 WHMCS Developer Share Posted January 17, 2008 http://support.whmcs.com/knowledgebase.php?action=displayarticle&catid=7&id=26 0 Quote Link to comment Share on other sites More sharing options...
dannzegos Posted January 17, 2008 Author Share Posted January 17, 2008 I read the link you sent me, but with only two sentences to explain it, I'm really not sure what I'm looking at. Here is the code... <?php 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") { # 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. $smarty->assign('variablename', $value); This can then be used as {$variablename} in the template */ include("display.php"); ?> If I want the file CustomWebDev.php to have the header and footer, where would I put the file in the above code? Thanks, Jay. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted January 18, 2008 WHMCS Developer Share Posted January 18, 2008 under the require init.php line 0 Quote Link to comment Share on other sites More sharing options...
dannzegos Posted January 18, 2008 Author Share Posted January 18, 2008 Could you please give me a code reference? Use the code provided, and put in the CustomWebDev.php file exactly as it should be. Thanks a bunch, DZ 0 Quote Link to comment Share on other sites More sharing options...
dannzegos Posted January 18, 2008 Author Share Posted January 18, 2008 I added "include("customwebdev.php");" right below init.php (also tried require instead of include) and it just puts my php page above the header, homepage, and footer. I removed the homepage in that code and replaced it with my php page (using include) and it does the same thing minus displaying homepage. I would like my page to display where homepage.tpl would normally be displayed once I click on the link from homepage.tpl. please help, DZ 0 Quote Link to comment Share on other sites More sharing options...
lynnette Posted January 18, 2008 Share Posted January 18, 2008 You put the whole code you put above, into a new page called customwebdev.php, then make a page called customwebdev.tpl in the template folder which contains your html code, then where it says: # Define the template filename to be used without the .tpl extension $templatefile = "homepage"; Replace "homepage" with "customwebdev" 0 Quote Link to comment Share on other sites More sharing options...
dannzegos Posted January 18, 2008 Author Share Posted January 18, 2008 Thanks so much guys and gals... I appreciate the example Lynnette, sometimes seeing helps a ton. I do have a new question that arose implementing this code, and that is of the breadcrumbnav in the code... It shows my breadcrumb as "You are here: Home" and Home is not linked, just plain text. I would like it to read "You are here: Home > Custom Web Development". What do I need to do to this code to get it to say that and be clickable (linked)? Thanks, DZ. 0 Quote Link to comment Share on other sites More sharing options...
dannzegos Posted January 18, 2008 Author Share Posted January 18, 2008 Thanks again guys I found the answer here... http://forum.whmcs.com/showthread.php?t=5802&highlight=breadcrumbnav I good to go, thanks again for all your help... Thanks, DZ. 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.