Categories > TinyButStrong general >

conditional check for block existence

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: gmak
Date: 2004-02-18
Time: 18:22

conditional check for block existence

Is there a way to check to see whether a block has been defined?

for example:

[tbs_check; if[block]; then [block.name]; else 'do this']

By: Skrol29
Date: 2004-02-18
Time: 18:34

Re: conditional check for block existence

Hi,

You can check it from the PHP side using the GetBlockSource() methode. It returns false is the block is not found.

You can set a PHP variable to 0 or 1 rather if the block exists or not, and then use this variable for the conditional display.