IF Then Display Text on Homepage Only
Posted: Sat Dec 20, 2008 5:22 pm
Hi all, new to php. I am trying to put a command in my header that will display some text only if it is the home page or "/" page.
<?php if($this->getRequest()->getRequestUri() == '/') { /* show it */ } ?>
This is what I have so far, but not working correctly. Can some one tell the full php code to use if the page is the home page do this <div class="vtop"><h1 align="center">DOG CAR SEATS | DOG CAR SEAT</h1></div> and if not the home page, do nothing at all?
Thanks in advance
<?php if($this->getRequest()->getRequestUri() == '/') { /* show it */ } ?>
This is what I have so far, but not working correctly. Can some one tell the full php code to use if the page is the home page do this <div class="vtop"><h1 align="center">DOG CAR SEATS | DOG CAR SEAT</h1></div> and if not the home page, do nothing at all?
Thanks in advance