Categories > TinyButStrong general >

conditional block AND subblock trouble

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Jérémy Lal
Date: 2009-03-04
Time: 20:28

conditional block AND subblock trouble

on TBS 3.4.0,
i get troubles where a try to embed a conditional subblock a conditional block, like
<p class="refsItemG">
    <a href="about" class="refsbtnitemGsel" id="batiment[types.$]" onclick="return showSubmenu(this);"> [types.text;block=p+div;when [types.id]=[id_type];several]</a>
</p>
<div class="slideRefsBlanc" id="gbatiment[types.$]">
    <div class="slideRefs">
        <a href="about" class="contSlideSel">
            <img src="media/reference/menu/[listetypes.file]" class="imgVignRefs" alt="[listetypes.titre]" />
            <span class="titrContSlide">[listetypes.titre;block=a;p1=[types.id];when [listetypes.id]=[id_reference];several]</span>
        </a>
        <a href="about" class="contSlide">
            <img src="media/reference/menu/[listetypes.file]" class="imgVignRefs" alt="[listetypes.titre]" />
            <span class="titrContSlide">[listetypes.titre;block=a;p1=[types.id];default]</span>
        </a>
    </div>
</div>
<p class="refsItemG">
    <a href="about" class="refsbtnitemG" id="batiment[types.$]" onclick="return showSubmenu(this);"> [types.text;block=p+div;default]</a>
</p>
<div class="slideRefsBlanc" id="gbatiment[types.$]">
    <div class="slideRefs">
        <a href="about" class="contSlideSel">
            <img src="media/reference/menu/[listetypes.file]" class="imgVignRefs" alt="[listetypes.titre]" />
            <span class="titrContSlide">[listetypes.titre;block=a;p1=[types.id];when [listetypes.id]=[id_reference];several]</span>
        </a>
        <a href="about" class="contSlide">
            <img src="media/reference/menu/[listetypes.file]" class="imgVignRefs" alt="[listetypes.titre]" />
            <span class="titrContSlide">[listetypes.titre;block=a;p1=[types.id];default]</span>
        </a>
    </div>
</div>

sorry i had no time to simplify.
i tested without the conditionals on 'listetypes' (block=a) and it works ok, i have my data merged.
Also i tried without using block=p+div, or without putting conditional on the block=p+div,
and it doesn't work either.
When it doesn't work, i get an empty <div class="slideRefs">  </div>, as if the block=a was deleted somehow.
Anybody knows what's wrong with me ?
By: Skrol29
Date: 2009-03-06
Time: 17:58

Re: conditional block AND subblock trouble

Hi Jérémi,

You are trying to perform a dynamic query (p1=...) and conditional sections in the same block. The manual tell it should be ok, but in my point of view, you have to specify parameter "p1=" only for the section when you what the query to be re-calculated.

I.E.:
[listetypes.titre;block=a;p1=...;when ...; several]
[listetypes.titre;block=a;default]

[listetypes.titre;block=a;p1=...;when ...; several]
[listetypes.titre;block=a;default]
By: Jérémy Lal
Date: 2009-03-10
Time: 18:33

Re: conditional block AND subblock trouble

yes, that's it.
i guess it should be written somewhere in the docs ?

thank you.
By: Skrol29
Date: 2009-03-11
Time: 17:07

Re: conditional block AND subblock trouble

It is logical when you know the concept, but it should be precised in the manual.