Page 1 of 1

Footer Link

Posted: Mon Jan 28, 2013 9:42 pm
by Winhatter
Wondering how I can have a footer link show only on the home page? The below source currently shows the link at the bottom of every page.

CODE:
<!-- You can add some content here shows at the very bottom of the page -->

<p class="page-footer"><br><div align="center" ><a href="thewebsite[dot]com" target="_blank" >website[dot]com</a></div></p>

Your help would be appreciated, thanks in advance. :)

Re: Footer Link

Posted: Tue Jan 29, 2013 4:22 pm
by mrenigma
You can wrap it in an if statement, so if for instance your homepage is called "home" you could do:

{if $page_alias == "home"}
// YOUR CODE
{/if}

Alternatively just create an alternative GCB/template for the homepage.

Re: Footer Link

Posted: Tue Jan 29, 2013 9:04 pm
by Winhatter
Hi mrenigma, thanks for the reply... The home page is not labelled, it just shows the URL at the home page. Though not shown, I guess index.php would be the home page.

Would this work then?

{if $page_alias == "index.php"}
// YOUR CODE
{/if}

Thanks.

Re: Footer Link

Posted: Tue Jan 29, 2013 10:19 pm
by Winhatter
Disregard my last comment if it shows about index.php. I've sorted it out and your solution works.

Thanks for the help! :)

Re: Footer Link

Posted: Wed Jan 30, 2013 8:40 am
by mrenigma
Lol no worries, don't forget to add [Solved] to the thread title :)