It is very useful for drupal html designers to know if you are actually in the frontpage (home page) or not. I already explained how to know if you are on joomla homepage and knowing where you are (joomla).
Let’s see how this is done in drupal
For instance, if you want some code to appear ONLY on the front page use:
if ($is_front){ //code that will only be showing on the homepage } |
if you want the table to appear on all frontpage-like pages (for e.g. the page that you get when you click on a taxonomy term), the use:
if($page==0){ //do stuff on all frontpage-like pages } |