Categories > TinyButStrong general >

blocks with no corresponging

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: luca
Date: 2006-11-16
Time: 18:19

blocks with no corresponging

In my template I have 3 blocks:

menu_1
menu_2
menu_3

but not always all 3 menus are merged in the php. When one isn't it just doesn't do anything. I'd like it to disappear, I mean

<li>[menu_3.abc]</li>

I don't want to see the [menu_3.abc] on my webpage !

How can I do it?

bye
By: Skrol29
Date: 2006-11-16
Time: 19:25

Re: blocks with no corresponging

You can use MergeBlock() to deleted a block :
  if ($m3==0) {
    $TBS->MergeBlock('b3','clear');
  } else {
    $TBS->MergeBlock('b3',$data);
  }

Otherwise, you can use a conditional block [onload] if you want it to be deleted before the merge, and [onshow] if it has to be deleted after the merge.
Example : <li>[menu_3.abc][onshow;block=li;when [var.m3]=1]</li>