[solved] ishomepage help please

Hi guys

I am trying to work out how in a template I can check if the site is displaying the homepage or not.

What I am trying to do is have something like

if homepage
use this html code
else
use this html code

I tried

<?php if(!isset($ishomepage)) { ?>
<div id="home">
<?php } else { ?>
<div id="nothome">
<?php } ?>

But no luck :(

Please let me know the right way to get this to work

Thanks in advance

GW

Comments

  • Arghh, I had it slightly wrong and the wrong way around, correct was

    <?php if(!isset($ishomepage)) { ?>
    <div id="nothome">
    <?php ;} else { ?>
    <div id="home">
    <?php ;} ?>

    All working - cheers

    GW
Sign In or Register to comment.