By: melistik
Date: 2007-08-22
Time: 22:26
|
grouping problems... how to show html outer of a block
i'm in trouble with my groupings and i do not know how to fix it :(
<tr>
<td id="title">[meal.title;block=tr+tr;headergrp=title]</td>
<td id="price">[meal.price]</td>
</tr><tr>
<td id="info">[meal.info]</td>
<td id="sum"><input type="hidden" class="meal" name="id[meal.id]" value="[meal.id]" />
<input type="text" class="meal" name="menge[meal.id]" value="0" size="2"/></td>
</tr><tr>
<td colspan="2">
<span class="meal"><input type="[meal.multiple;if [val]=1;then 'checkbox';else 'radio';block=span;when [meal.lable] != '']" class="meal" name="option[]" value="[meal.lable;block=span;when [meal.lable] != '']" />[meal.lable;block=span;when [meal.lable] != '']
</span>
</td></tr>
|
my output looks like this ...
<tr>
<td id="title">Döner</td>
<td id="price">5</td>
</tr><tr>
<td id="info">Lecker Döner</td>
<td id="sum"><input type="hidden" class="meal" name="id2" value="2" />
<input type="text" class="meal" name="menge2" value="0" size="2"/></td>
</tr><span class="meal"><input type="radio" class="meal" name="option[]" value="Gurken" />Gurken
</span><span class="meal"><input type="radio" class="meal" name="option[]" value="Käse" />Käse </span>
<tr>
<td id="title">Pommes</td>
<td id="price">2.3</td>
</tr><tr>
<td id="info">lecker Pommes</td>
<td id="sum"><input type="hidden" class="meal" name="id3" value="3" />
<input type="text" class="meal" name="menge3" value="0" size="2"/></td>
</tr>
</td></tr>
|
there is missing <tr><td colspan="2"> before the first <span class="meal"> and after the last </span> is missing </td></tr>
how can i fix this ?
|
By: Skrol29
Date: 2007-08-23
Time: 00:19
|
Re: grouping problems... how to show html outer of a block
Hi Melistk,
This is because of your tag [meal.multiple;...block=span]
This TBS tag defines a section only on <span></span>.
All that is between this section and the previous one is deleted.
The previous section is the headergrp defined on a double <tr>.
Another remark : there is no need to repeat the block bound "block=..." several times inside the same section. Only the first one is token in acount, other are ignored.
Another HTML remark : in your template you have <td id="info">. This tag will be repeated because of the merge. But in HTML you shouldn't have several tags with the same id. It is ok for the "name" attribute, but not for the "id" attribute.
|
By: melistik
Date: 2007-08-23
Time: 05:29
|
Re: grouping problems... how to show html outer of a block
ok thanks for that,
but how can i fix it so that one <tr><td colspan="2"> is shown for each meal.title ?
because i do not want to build for each meal.lable a hole table line ...
i hope there is a solution :)
|
By: Skrol29
Date: 2007-08-24
Time: 23:28
|
Re: grouping problems... how to show html outer of a block
Then extend your headergrp section more than tr+tr.
But if don"t want any detail in your merged block, it is better to make a grouping query.
|
|
Posting in progress.
Please wait...
|