Sitellite allows you to access pieces of the page body, instead of the whole thing, for the purposes of displaying it in multiple columns, with a pager (ie. the 'previous|next' links), or in other complex layout scenarios. This is done via the body_parts array in XT. The pieces of the body are split by horizontal rule tags. Note that you can always access the original page body inclusive of horizontal rules if you don't need your page body split up.
Example Usage:
<xt:condition>
<xt:if expr="php: count (object.body_parts) eq 1">
<!-- there is only one part -->
<xt:var name="body" />
</xt:if>
<xt:else>
<!-- split into two columns -->
<table border="0" width="100%">
<tr>
<td width="50%" style="padding: 3px; padding-right: 15px">
<xt:var name="body_parts/0" />
</td>
<td width="50%" style="padding: 3px">
<xt:var name="body_parts/1" />
</td>
</tr>
</table>
</xt:else>
</xt:condition>
Revision from August 1, 2007 1:15 PM by admin
Forward in time (1 more) | Back in time (1 more) | See current | See changes | Linked from: Templates