xoops forums

sova

Not too shy to talk
Posted on: 2011/12/12 10:10
sova
sova (Show more)
Not too shy to talk
Posts: 149
Since: 2010/4/13
#1

block id in theme

If each block has a specific ID to use it The theme?

-------------
Sorry I can not speak English well

Mamba

Moderator
Posted on: 2011/12/12 10:37
Mamba
Mamba (Show more)
Moderator
Posts: 10933
Since: 2004/4/23
#2

Re: block id in theme

Normally XOOPS takes care of blocks management for you.

If you want to control blocks manually, you can try "Blocks Anywhere"
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

kerkyra

Just can't stay away
Posted on: 2011/12/12 11:06
kerkyra
kerkyra (Show more)
Just can't stay away
Posts: 553
Since: 2005/2/14
#3

Re: block id in theme

you can also use the block id in your themes like this

Quote:

<div>
<{if $block.title != ""}>
<div class="blockTitle blocktitle<{$block.id}>" ><{$block.title}></div>
<{/if}>
<div class="blockContent content<{$block.id}>"><{$block.content}></div>
</div>


then you can use css to edit the appearance of a specific block like this
Quote:

.blocktitle10 {css for title in here}
.content10 {css for content in here}


Of course you have to create your block first (so you can identufy its id)
and then write its css.