graisbeck Posted April 9, 2017 Share Posted April 9, 2017 Hi, I have added some information to my footer.tpl which of course displays on every page. Can someone please tell me how to display the information only on the homepage, please? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 9, 2017 Share Posted April 9, 2017 Perhaps you could adapt this to your needs. https://forum.whmcs.com/showthread.php?101427-Set-title-of-page-using-an-action-hook 0 Quote Link to comment Share on other sites More sharing options...
graisbeck Posted April 9, 2017 Author Share Posted April 9, 2017 Thanks for that bear, even though I'm not exactly sure how to go about it. I'm using WHMCS as the basis of my site. My website url is gladstone-hosting.net and the areas I don't want to include on other pages are the softucous and site pro containers. The actual footer, as in the blue area at the bottom of the page, I would like to include on every page. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted April 9, 2017 Share Posted April 9, 2017 using this IF statement it will be displayed in homepage (index.php) only: {if $templatefile eq "homepage"} // Content Displayed in HomePage {/if} 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 9, 2017 Share Posted April 9, 2017 Ah, I think what you want has to do with conditional statements in the footer file, then. https://developers.whmcs.com/themes/conditionals/ Last I'd looked in Smarty, "eq" means equals, and "neq" was not equals. [EDIT] I was a bit slow. 0 Quote Link to comment Share on other sites More sharing options...
graisbeck Posted April 10, 2017 Author Share Posted April 10, 2017 Thank you for the info. I tried adding this to footer.tpl but it did not diplay in homepage or any other page - {if $filename eq "index.php"} <div class="soft"><img src="/templates/customtheme/img/soft_productlogo.jpg" alt="Softaculous one click install software" width="100%" height="auto"></div> <div class="webbuilder"> <h3>Site Pro - Website Builder<img src="/templates/customtheme/img/site-pro.png" width="50%" height="auto" align="right"></h3><h4>A FREE application with lots of templates to help you build <br />a fantastic website.</h4> <ul> <li>Site Pro is an intuitive, simple to use website builder</li> <li>The simplest way to build a website</li> <li>Choose from lots of templates</li> <li>Start editing right away, adding text, images, buttons and widgets</li> <li>Simple drag and drop functionality</li> <li>FREE image gallery and slideshow make for a great looking design</li> <li>Set up a Professional website within hours</li> <li>All features have step-by-step directions</li> <li>Included FREE in all hosting packages</li> </ul> </div> {/if} 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 10, 2017 Share Posted April 10, 2017 if you're going to use $filename, then it's... {if $filename eq "index"} ... though it would be more precise to use sentq's suggestion of $templatefile. 0 Quote Link to comment Share on other sites More sharing options...
graisbeck Posted April 10, 2017 Author Share Posted April 10, 2017 I used sentq's suggestion and it works great. Thanks all for your help with this 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.