Member
Member
gwmbox   2010-11-21, 01:39
#1
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 Sad

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

Thanks in advance

GW
Member
Member
gwmbox   2010-11-21, 01:49
#2
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
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.