How can I determine if it's home page

Author Message

Seb B

Thursday 10 June 2010 2:07:11 am

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,

Ivo Lukac

Thursday 10 June 2010 3:22:31 am

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}

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Seb B

Thursday 10 June 2010 5:24:33 am

Thanks it works !

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.