Jump to content

[SOLVED]Change background from the point of view of categories


Recommended Posts

hello how can i change <body id"[name]"> from point of view of category

i want have different bg on different category

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

some like, that:

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

Link to comment
Share on other sites

I suggesting adding the id as a class to body to avoid breaking anything that references body#category. Try the following:

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



Then you can reference any element on a specific category page with body.category1, body.category2, etc.

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...