TinyButStrong - the PHP Template Engine
Categories > TinyButStrong general >

nodata not working

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: Fabrizio Lodi
Date: 2016-05-22
Time: 16:26

nodata not working

<select id="modello" name="s_modello" class="form-control">
    <option value=""></option>
[bModelli;block=begin]
    <option value="[bModelli.tipo]">[bModelli.tipo]</option>
    <option>[s_modello;ope=html;select]</option>
[bModelli;block=end]
</select>
[bModelli;block=begin;nodata]
No Data
[bModelli;block=end]
</select>

Even with

$TBS->MergeBlock('bModelli',array());

The nodata section is ignored. Why?
By: Skrol29
Date: 2016-05-23
Time: 00:07

Re: nodata not working

Hi,

I tested your snippet and it works ok for me.
Nevertheless, I've modified something: there should be no content between two section of the same block. Otherwise this content is deleted by TBS.

You should replace :
[bModelli;block=end]
</select>
[bModelli;block=begin;nodata]

with:
[bModelli;block=end]
[bModelli;block=begin;nodata]