xoops forums

jimkarvo

Not too shy to talk
Posted on: 2007/3/2 20:52
jimkarvo
jimkarvo (Show more)
Not too shy to talk
Posts: 169
Since: 2005/9/19
#1

Auto-hide blank blocks

Hello,

I have a question for you. I want to auto-hide a block when its content is blank!

Can I do that?

Thanks,

JimKarvo
www.pc4allgr.com - Greek community for PCs

PC4ALL Admins' Team!

LiliVG

Just popping in
Posted on: 2007/3/3 4:32
LiliVG
LiliVG (Show more)
Just popping in
Posts: 65
Since: 2005/12/25
#2

Re: Auto-hide blank blocks

could you try an if statement in the block template file? for example:

<{if $block.content}>
<div style="padding: 5px;">
<fieldset>
<legend class="blockTitle"><{$block.title}></legend>
<div class="blockContent"><{$block.content}></div>
</fieldset>
</div>
<{/if}>

?

I don't know if it would work for sure, but that would be my first shot.