hide all block when no content [solved]
Posted: Sat Jan 20, 2007 12:25 am
Hi all,
i've two main block on my pages, and the second block is not always filled, it can be empty.
the block2 is defined like that :
so when the content and title is empty, the box with shadows is displayed anyway.
i'd like to know if this is possible to avoid displaying this if the content is empty, like in spip, a bit like that :
but working 
i've two main block on my pages, and the second block is not always filled, it can be empty.
the block2 is defined like that :
Code: Select all
<div class="shadow">
<div class="contentbox">
<div class="title">
<h2>{content block='block2title' oneline='true'}</h2>
</div>
<div class="content">
{content block='block2'}
</div>
</div>
</div>
i'd like to know if this is possible to avoid displaying this if the content is empty, like in spip, a bit like that :
Code: Select all
{ if $idontknowwhat != '' }
<div class="shadow">
<div class="contentbox">
<div class="title">
<h2>{content block='block2title' oneline='true'}</h2>
</div>
<div class="content">
{content block='block2'}
</div>
</div>
</div>
{/if}
