Lotusweb Posted May 15, 2014 Share Posted May 15, 2014 Hi, I just want to modify class style to one specific page. I have 3 categories, and I want to modify style to just one category page. How can I do that? Link to comment Share on other sites More sharing options...
dioniz Posted May 15, 2014 Share Posted May 15, 2014 Check body class of desired category in your html source and make css classes according to that category. So if your page class is : <body id="category" class="category category-3 category-women hide-right-column lang_en"> style for left column bg would be something like that: .category-3 #left_column{ background:#000; } Link to comment Share on other sites More sharing options...
Lotusweb Posted May 15, 2014 Author Share Posted May 15, 2014 Check body class of desired category in your html source and make css classes according to that category. So if your page class is : <body id="category" class="category category-3 category-women hide-right-column lang_en"> style for left column bg would be something like that: .category-3 #left_column{ background:#000; } Thanks dioniz! but my html source is: <body id="category" class="category lang_es"> I dont know where is the category number Link to comment Share on other sites More sharing options...
dioniz Posted May 16, 2014 Share Posted May 16, 2014 What version PS you have? 1 Link to comment Share on other sites More sharing options...
Lotusweb Posted May 16, 2014 Author Share Posted May 16, 2014 I have PrestaShop™ 1.5.6.1 Link to comment Share on other sites More sharing options...
dioniz Posted May 16, 2014 Share Posted May 16, 2014 That code i gave you is for 1.6 I have no idea how to do it in 1.5.6 sorry. Link to comment Share on other sites More sharing options...
vekia Posted May 16, 2014 Share Posted May 16, 2014 in your header.tpl file use code like: instead of simple: <body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{if isset($page_name)}{$page_name|escape:'htmlall':'UTF-8'}{/if}{if $hide_left_column} hide-left-column{/if}{if $hide_right_column} hide-right-column{/if}{if $content_only} content_only{/if}"> use: <body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{if isset($category)}category_{$category->id}{/if}{if isset($page_name)}{$page_name|escape:'htmlall':'UTF-8'}{/if}{if $hide_left_column} hide-left-column{/if}{if $hide_right_column} hide-right-column{/if}{if $content_only} content_only{/if}"> then each category page will have class category_X where X is the category ID 1 Link to comment Share on other sites More sharing options...
Lotusweb Posted May 16, 2014 Author Share Posted May 16, 2014 in your header.tpl file use code like: instead of simple: <body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{if isset($page_name)}{$page_name|escape:'htmlall':'UTF-8'}{/if}{if $hide_left_column} hide-left-column{/if}{if $hide_right_column} hide-right-column{/if}{if $content_only} content_only{/if}"> use: <body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{if isset($category)}category_{$category->id}{/if}{if isset($page_name)}{$page_name|escape:'htmlall':'UTF-8'}{/if}{if $hide_left_column} hide-left-column{/if}{if $hide_right_column} hide-right-column{/if}{if $content_only} content_only{/if}"> then each category page will have class category_X where X is the category ID Excelent! It works, thank u very much Vekia Link to comment Share on other sites More sharing options...
vekia Posted May 16, 2014 Share Posted May 16, 2014 glad to hear that i could help a little :-) i marked topic as solved. with regards, Milos Link to comment Share on other sites More sharing options...
Recommended Posts