11
here is the code that I have tested with xoops 2.5.9 RC1 and the xbootstrap theme. I tested it now only with the leftblocks but it will work will all blocks. open themes/xbootstrap/tpl/leftBlock.tpl and change your code of the block to this
le="color: #000000"><?php <{if $xoBlocks.canvas_left}> <div class="col-sm-3 col-md-3 xoops-side-blocks"> <{foreach item=block from=$xoBlocks.canvas_left}> <aside <{if $block.title && strpos($block.title, '|') != false }> class="<{$block.title|substr:0:8}>" <{/if}>> <{if $block.title}><h4 class="block-title"><{if strpos($block.title, '|') != false }><{$block.title|substr:9}><{else}><{$block.title}><{/if}></h4><{/if}> <{$block.content}> </aside> <{/foreach}> </div> <{/if}>
short explanation what I am doing here. The new css class will always have 8 characters, like block-01. In the aside-tag I am checking if the title has a | in it, and if so I will take the part before | as my class. In the title of the block I again need to check if the title has a | in it, and if so I will only display the text behind | as my title, else it will display the complete title then I define some css classes in my theme.html (you can also define them in the style.css)
le="color: #000000"><?php .block-01{background: #5CB85C;} .block-02{background: #C3C3C3;} .block-03{background: #333333;}
Now when you want to change the style of a block you need only to name the block like the class For examle if you wan to change the main menu block you will name it "block-01|Main Menu" I hope you understand everything here