Jump to content

Different header background for home and the rest of pages


Recommended Posts

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

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 by clint (see edit history)
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...