Jump to content

Use a diffrent style sheet per category?


Recommended Posts

Hi everyone!

First of all, thanks to you folks for that great shop of yours! Been using it for 2 weeks now and I am close to finish my first customer site with it!

As I am redesigning the front end right now, I ran into a little problem, which you might be able to solve.

I want to switch the style sheet on the header bar if I am in a certain category.

For example, if a customer is viewing a product in cat. A I would like to switch the header bar to a red color. If he is in B I want to switch to green... etc

Is this somehow possible to get the active cat ID and the use it somehow to change a style?
I am a real Newbie when it comes to smarty, so any help is very much appreciated!

Thanks in advance & Cheers
Michael

Link to comment
Share on other sites

  • 1 month later...

I would like to know this too...

I tried by adding a class to the body

In header.tpl:

<body {if $page_name}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if}{if $page_name=='category'}class="{$category->name}"{/if}>

But this doesn't work... Maybe if someone knows which smarty variables I could use in header.tpl?

Link to comment
Share on other sites

×
×
  • Create New...