$mission only on front page

keto - July 27, 2008 - 21:06

I have found a few posts on this subject and it appears as though most people are wanting to do the opposite of what I need. Currently the mission statement shows up on all paginated pages of the front page. My goal is to have mission show up only on the homepage however.

Here is the current code in the page.tpl.php file:

<?php
if ($mission) {
?>
<?php
print $mission
?>
<?php
}
?>

I have tried the following with no success:

<?php
if ($is_front) {
?>
<?php
print $mission
?>
<?php
}
?>

&

<?php
if ($page==0) {
?>
<?php
print $mission
?>
<?php
}
?>

Thanks,

Keto

Check for the page in $_GET,

pbull - July 27, 2008 - 21:25

Check for the page in $_GET, to see if the value is not set or greater than 0:

<?php
php
if ($mission && ($_GET['page'] == 0)) {
  print
$mission;
}
?>

Use this

kuldip zala - September 1, 2008 - 04:25

hi,

You can write in your page.tpl.php.

<?php
if($is_front) {
?>

<?php
if ($mission): print '<div id="mission">'. $mission .'</div>'; endif;
?>

<?php
}
?>

Thanks,

Kuldip

 
 

Drupal is a registered trademark of Dries Buytaert.