shopsecure Posted January 7, 2011 Share Posted January 7, 2011 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/demo7any 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.<?phpif($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 More sharing options...
webcrafter Posted January 10, 2011 Share Posted January 10, 2011 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/demo7any 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.<?phpif($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 More sharing options...
shopsecure Posted January 11, 2011 Author Share Posted January 11, 2011 Yes, thanks! That's great, this piece was exactly what I was looking for. Works perfectly between te header and content only for the home page.You're te man! Link to comment Share on other sites More sharing options...
webcrafter Posted January 11, 2011 Share Posted January 11, 2011 Thanks, glad it was the help you needed. I can't take credit though, I found it on an older thread here http://www.prestashop.com/forums/viewthread/9482/installing_prestashop/changing_layout_based_on_page_id at the end by Bimal. Just happened to be working on the same thing myself :-) Link to comment Share on other sites More sharing options...
adrymalotqram Posted January 13, 2011 Share Posted January 13, 2011 wow thank you ^^ Link to comment Share on other sites More sharing options...
webcrafter Posted January 13, 2011 Share Posted January 13, 2011 wow thank you ^^ Any time, glad to be of help if it was just searching through the forums :-) Link to comment Share on other sites More sharing options...
ashkansharifi Posted February 16, 2011 Share Posted February 16, 2011 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 saywhat 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now