Drupal Questions & Answers

Ask and answer Drupal related questions! No question too simple or complex!
Freelance's picture
Asked by on Fri 24th Apr 2009
When theming how do you make a portion of code appear on only the front page?

This is kind of an “emergency” question. I am working in Drupal 5. Below is the code I have written to make the code within the if statement display on just the front page.

This code does not print the the image and image map on the front page, or anywhere else.

Do you spot any issues with the code?


if ($is_front):
       <img name='tvback_r2_c1' src='base_path() . path_to_theme()/images/tv-back_r2_c1.png' border='0' id='tvback_r2_c1' usemap='#m_tvback_r2_c1' alt='' />
       <map name='m_tvback_r2_c1' id='m_tvback_r2_c1'>
             <area shape='rect' coords='119,69,163,79' href='archive.html' alt='' />

Commenting on this Drupal Question is closed.