11
Bleekk
Re: Setting the block
  • 2017/6/18 9:35

  • Bleekk

  • Theme Designer

  • Posts: 939

  • Since: 2002/12/14


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

12
Bleekk
Re: Setting the block
  • 2017/6/18 9:41

  • Bleekk

  • Theme Designer

  • Posts: 939

  • Since: 2002/12/14


Here are screenshots of the result
First naming the block
Resized Image

and the result
Resized Image

13
aerograf
Re: Setting the block
  • 2017/6/18 18:37

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Thanks for the detailed explanation.
I'll try to apply.

14
aerograf
Error : Handler does not exist
  • 2017/6/23 20:27

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


One more question.
What can cause this error?
I've already looked through everything, all the functions, etc. Sort of checked.
Error Handler does not exist
Module
printliminator
Name
printliminator in the file /include/functions.php line 87

15
aerograf
Re: Error : Handler does not exist
  • 2017/6/24 6:44

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Understood.

Login

Who's Online

59 user(s) are online (25 user(s) are browsing Support Forums)


Members: 0


Guests: 59


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits