jvdemari Posted August 13, 2013 Share Posted August 13, 2013 Hi mates! First of all, sorry if this topic was covered before. I've been searching here but didn't find anything that works for me.I'm new into prestashop, and I'd like to know how to change the categories menu, making each category have its own background color. Not the background of the entire website, just the background of the row that contains the name of the category in the left menu.You can take a look at www.ortosan.es to see what I'm talking about.I'm using prestashop 1.5.4.1Thanks so much Link to comment Share on other sites More sharing options...
vekia Posted August 14, 2013 Share Posted August 14, 2013 i need one additional information, what ps theme you use? everything depends on it Link to comment Share on other sites More sharing options...
jvdemari Posted August 14, 2013 Author Share Posted August 14, 2013 Default theme Link to comment Share on other sites More sharing options...
vekia Posted August 14, 2013 Share Posted August 14, 2013 okay, thanks for clarification. in this case you have to edit two things. #1 template file of the category block: modules/blockcategories/category-tree-branch.tpl you've got there: <li {if isset($last) && $last == 'true'}class="last"{/if}> change it to: <li {if isset($last) && $last == 'true'}class="last blockcategoryitem_$node.id"{/if}> then each element in the block categories will have own class: blockcategoryitem_1 blockcategoryitem_2 blockcategoryitem_6 etc.. #2 then in the global.css style you will be able to create styles like: .blockcategoryitem_1{ background:red; color:white; } or any other styles you want 1 Link to comment Share on other sites More sharing options...
jvdemari Posted August 14, 2013 Author Share Posted August 14, 2013 (edited) Thank you but it's not working I changed what you told me but nothing changes, just that at top of the page appears a part of the code class=" "> Edited August 14, 2013 by jvdemari (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 15, 2013 Share Posted August 15, 2013 i checked the code once again, can you use this one: <li class="blockcategoryitem_{$node.id} {if isset($last) && $last == 'true'}last{/if}"> this is what i've got after usage of code above: Link to comment Share on other sites More sharing options...
jvdemari Posted August 26, 2013 Author Share Posted August 26, 2013 Thanks for the reply, but still not working, nothing changes anything else I can try? Thanks again Link to comment Share on other sites More sharing options...
vekia Posted August 26, 2013 Share Posted August 26, 2013 can you show how your coode looks like now? Link to comment Share on other sites More sharing options...
jvdemari Posted August 28, 2013 Author Share Posted August 28, 2013 Link to comment Share on other sites More sharing options...
jvdemari Posted September 5, 2013 Author Share Posted September 5, 2013 anyone can help me please?? Link to comment Share on other sites More sharing options...
vekia Posted September 5, 2013 Share Posted September 5, 2013 your code looks well, it should work. so maybe check themes/YOUR_THEME/modules/blockcategories/ directory for .tpl files if these files exist there - you have to change them Link to comment Share on other sites More sharing options...
jvdemari Posted September 6, 2013 Author Share Posted September 6, 2013 yes! that was the problem, thanks so much, Vekia! Link to comment Share on other sites More sharing options...
vekia Posted September 6, 2013 Share Posted September 6, 2013 glad to hear that it is solved now im going to mark this thread as [solved] if you will have any questions - feel free to continue discussion best regards Link to comment Share on other sites More sharing options...
sikera Posted February 17, 2014 Share Posted February 17, 2014 (edited) Hi I do whit different img every category list. But I want img start 50px before category in left position. I want someting like this: ...............category1... .......................category2... ....................categpry3... .................category4... I try to put img in post but i can't 0.o Edited February 17, 2014 by sikera (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 18, 2014 Share Posted February 18, 2014 Hi I do whit different img every category list. But I want img start 50px before category in left position. I want someting like this: ...............category1... .......................category2... ....................categpry3... .................category4... I try to put img in post but i can't 0.o hello i replied in your original topic, if is possible, please continue discussion there: http://www.prestashop.com/forums/topic/309273-css-how-background-category-start-before-them Link to comment Share on other sites More sharing options...
cynthia1301 Posted April 12, 2016 Share Posted April 12, 2016 (edited) Hello, All apologizes for my english ! I am sorry to exhume the topic but my code doesn't look like the quoted one. I don't understand where i can get the class. Can someone help with this : {if $blockCategTree && $blockCategTree.children|@count} <!-- Block categories module --> <div id="categories_block_left" class="block"> <!--<h2 class="title_block"> {if isset($currentCategory)} {$currentCategory->name|escape} {else} {l s='Categories' mod='blockcategories'} {/if} </h2>--> <div class="block_content"> <!--<ul class="tree {if $isDhtml}dhtml{/if}">--> <ul> {foreach from=$blockCategTree.children item=child name=blockCategTree} {if $smarty.foreach.blockCategTree.last} {include file="$branche_tpl_path" node=$child last='true'} {else} {include file="$branche_tpl_path" node=$child} {/if} {/foreach} </ul> {$blockCategTree|print_r} </div> </div> <!-- /Block categories module --> {/if} Thanks in advance ! Edited April 12, 2016 by cynthia1301 (see edit history) Link to comment Share on other sites More sharing options...
cynthia1301 Posted April 19, 2016 Share Posted April 19, 2016 Thank you very much ! i finally manage to do what i wanted ! Thankx again ! Link to comment Share on other sites More sharing options...
Recommended Posts