TinyButStrong - the PHP Template Engine

Example of sub-blocks

this TBS template is W3C compliant Valid XHTML 1.1

This example shows two ways of making sub-blocks. The first is using an automatic sub-block. The second is using a dynamic query.

Automatic sub-block

You can us it when the data of the sub-block is available in a particular column of the main block.

Team: [asb.team;block=tr;sub1=matches] , Total score: [asb.total]
Position Town Score Date
[asb_sub1.#] [asb_sub1.town;block=tr] [asb_sub1.score] [asb_sub1.date;frm='mm-dd-yyyy']
[asb_sub1.#] [asb_sub1.town;block=tr] [asb_sub1.score] [asb_sub1.date;frm='mm-dd-yyyy']

Sub-block with dynamic query

Data for the sub-block are requested for each record of the main block. It is important to merge the main block before the subblock.

Team: [mb.team;block=tr] , Total score: [mb.total]
Position Town Score Date
[sb.#] [sb.town;block=tr;p1=[mb.$]] [sb.score] [sb.date;frm='mm-dd-yyyy']
[sb.#] [sb.town;block=tr] [sb.score] [sb.date;frm='mm-dd-yyyy']