eGzyl.pl Posted January 13, 2010 Share Posted January 13, 2010 hello how can i change <body id"[name]"> from point of view of categoryi 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 More sharing options...
rocky Posted January 14, 2010 Share Posted January 14, 2010 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 More sharing options...
eGzyl.pl Posted January 14, 2010 Author Share Posted January 14, 2010 It walked about it, thxps. if u need changewith product u must change only id_category on id_product Link to comment Share on other sites More sharing options...
rocky Posted January 14, 2010 Share Posted January 14, 2010 Yes, if you want product-specific styling, you just change id_category to id_product. You can do the same with CMS pages by using id_cms. 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