Categories > TinyButStrong general >

Subtemplates within blocks

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Hactar
Date: 2006-02-06
Time: 01:55

Subtemplates within blocks

I want to render the contents of a block in another file, like so
<TR>
<TD>[listblock;block=tr;][listblock;file=showblock.tpl;]</TD>
</TR>
And then in showblock.tpl
listblock.Name , listblock.Address
Or whatever. Is this possible? It does seem to merge the contents of the file but the fields don't have any values, they just disappear.
By: Skrol29
Date: 2006-02-06
Time: 02:28

Re: Subtemplates within blocks

Hello,

If your subtemplate is the same for all record, then you can do normally:
<tr>
  <td>[listblock;block=tr][onload;file=showblock.tpl]<td>
</tr>

The subtemplate will be inserted when main template is loaded, so the full template will be ready for block merging.
By: Hactar
Date: 2006-02-06
Time: 03:17

Re: Subtemplates within blocks

Of course! I was thinking about it in totally the wrong way. Thanks a lot.