gonzaloii Posted July 23, 2015 Share Posted July 23, 2015 Hi there, Im using Prestashop 1.6.0.14 Im not good coding, but working hard to learn Im trying to use a background for header in homepage and a different one for the rest of the pages. I've found a post talking about how to change for categories and I guess the solution could be similar but can't make it work. Anyone knows a way to make it work editing CSS? I've created a CSS for modifications already linked in header.tpl and working for all the changes I've been doing, I would add the CSS code there to use a background image for header in homepage and a different image for the rest of the pages. Thank you in advance for your help. Link to comment Share on other sites More sharing options...
clint Posted July 23, 2015 Share Posted July 23, 2015 (edited) Put the background image for everything except the homepage in global.css Create a css file called (for example) homepage.css. in this would be the css to create background image you require for the homepage. At the very end of the <head> section right before </head> put {if $page_name == 'index'} <link rel="stylesheet" href="/link/to/css/homepage.css" type="text/css" media="all" /> {/if} Or you could use {if $page_name == 'index'} part visible on homepage {else} part visible everywhere else {/if} Edited July 23, 2015 by clint (see edit history) Link to comment Share on other sites More sharing options...
gonzaloii Posted July 23, 2015 Author Share Posted July 23, 2015 Thank you clint. Looks like it was more easy than expected to me Link to comment Share on other sites More sharing options...
clint Posted July 24, 2015 Share Posted July 24, 2015 No problem. It's only easy when you know the answers 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