xoops forums

Bleekk

Theme Designer
Posted on: 6/18 9:35
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 903
Since: 2002/12/14
#11

Re: Setting the block

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

Bleekk

Theme Designer
Posted on: 6/18 9:41
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 903
Since: 2002/12/14
#12

Re: Setting the block

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

and the result
Resized Image

aerograf

Not too shy to talk
Posted on: 6/18 18:37
aerograf
aerograf (Show more)
Not too shy to talk
Posts: 154
Since: 1/7 19:01
#13

Re: Setting the block

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

aerograf

Not too shy to talk
Posted on: 6/23 20:27
aerograf
aerograf (Show more)
Not too shy to talk
Posts: 154
Since: 1/7 19:01
#14

Error : Handler does not exist

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

aerograf

Not too shy to talk
Posted on: 6/24 6:44
aerograf
aerograf (Show more)
Not too shy to talk
Posts: 154
Since: 1/7 19:01
#15

Re: Error : Handler does not exist

Understood.