eZ Community » Forums » Setup & design » How can I determine if it's home page
expandshrink

How can I determine if it's home page

How can I determine if it's home page

Thursday 10 June 2010 11:07:11 am - 2 replies

Hello,

I would like to know if it's possible to determine if the current page is homepage or not...
I want to display a tag "H1" around my logo only on the homepage...

thanks in advance,

Thursday 10 June 2010 12:22:31 pm

Assuming you are in pagelayout.tpl or some included template (ezwebin extension) and your homepage node id is 2, you can do:

{if $current_node_id|eq(2)}<h1>{/if} 
....
{if $current_node_id|eq(2)}</h1>{/if}

Modified on Thursday 10 June 2010 12:22:57 pm by Ivo Luka─Ź

Thursday 10 June 2010 2:24:33 pm

Thanks it works !

As you explain it, I can use it for a lot of things, great !

Modified on Thursday 10 June 2010 2:25:42 pm by Seb B

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from