Jump to content

how can i add an image in the header displayed on the home page only?


Recommended Posts

does anyone know how to add an image (or flash object) in the header displayed on the "home page" only?

i mean one that goes on the body but across the entre content width, above the blocks, like here: http://www.prestashopthemes.net/demo7

any help is greatly appreciated.

i'm not a programmer, research shows something like this - however it's don't work and i don't know where to put, tried themes dir header.tpl but no show.

<?php
if($page != '/') {
include($page./ad.php');
}
?>

<?php
$uri = $_SERVER['REQUEST_URI'];
if ($uri == '/') {
echo 'home page';
} else {
echo 'internal page';
}
?>

Link to comment
Share on other sites

does anyone know how to add an image (or flash object) in the header displayed on the "home page" only?

i mean one that goes on the body but across the entre content width, above the blocks, like here: http://www.prestashopthemes.net/demo7

any help is greatly appreciated.

i'm not a programmer, research shows something like this - however it's don't work and i don't know where to put, tried themes dir header.tpl but no show.

<?php
if($page != '/') {
include($page./ad.php');
}
?>

<?php
$uri = $_SERVER['REQUEST_URI'];
if ($uri == '/') {
echo 'home page';
} else {
echo 'internal page';
}
?>


You could try opening the header.tpl and in the place you want the different material writing

{if $page_name eq 'index'}
the code you want displayed
{/if}



Anything between the opening if and the closing if will only show if the page name is index...you can also do this by page ID's as well.

Hope this helps

Link to comment
Share on other sites

  • 1 month later...

Hi guys this is great thread!

I have a question is there anyway to use the same method for having different background image?
What i mean is that to have static background image for the index and products lets say

what i have done:
global.css ~>

{if $page_name eq 'index'}
body {font-size: 11px; background:url('../img/main1.jpg')}
{/if}

body {font-size: 11px; background:url('../img/main.jpg')}

But it aint work!
can anyone help?
Thanks in advance

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...