Hi,
I want to have a different template for the homepage (and other pages).

I'm referring to a book published in September 2008 ('Drupal 6 Themes' by Ric Shreves) which says:
"To display an element on only the front page, make it conditional on the state of $is_front. For example, to display the site mission on only the front page of the site, wrap $mission (in your page.tpl.php file) .."

Sounds simple enough except that I couldn't find the variable $is_front in any page.tpl.php file. I'm using the Zen theme but it didn't appear in the Garland file either. However it does appear in the commented notes of the files.

Am I working with outdated information? Does anyone know of another way to change page templates?

I'm using version 6.14 on MAMP.

Thanks
A.

Comments

VM’s picture

you add the variable in if it's not already present or you can use a custom page-front.tpl.php file in your theme.

alex_a’s picture

thanks :)

nevets’s picture

Just because $is_front is not used in page.tpl.php does not mean it's not available. $is_front is a default variable set up by the templating system.