Page 1 of 1

Displaying a div layer only in the front page of my site

Posted: Fri Oct 01, 2010 3:33 am
by apa@imagix.dk
I have a general header.php file in my site that contains my site menu. I want to include a div layer above the site menu - but only on the front page. Can I do this using PHP... if "on front page" then "<div></div>"

...I obviously don't really know any PHP, but you get the idea.

Hope sombody can help me out!

Best,
Anders

Re: Displaying a div layer only in the front page of my site

Posted: Fri Oct 01, 2010 5:52 am
by DigitalMind
frontpage.php

Code: Select all

define('FRONT_PAGE', TRUE);
require 'header.php';
...
header.php

Code: Select all

if (defined('FRONT_PAGE')) {
    echo '<div></div>';
}
...
Did I get you wrong?

Re: Displaying a div layer only in the front page of my site

Posted: Fri Oct 01, 2010 6:07 am
by apa@imagix.dk
You got me just right - I works perfectly.

Thanks a million...