Examples
Smartsite SXML |
Copy Code
|
<se:sqlquery save="siblingsdata" resulttype="datatable">
<se:parameters>
<se:parameter name="sql">select nr, title from {channel.view()} where parent={itemdata.parent()}</se:parameter>
</se:parameters>
</se:sqlquery>
<se:siblings>
<se:parameters>
<se:parameter name="displayfirst"> <b><<</b> </se:parameter>
<se:parameter name="displaylast"> <b>>></b> </se:parameter>
<se:parameter name="displaynext"> <b>></b> </se:parameter>
<se:parameter name="displayback"> <b><</b> </se:parameter>
<se:parameter name="siblingorder">first,back,next,last</se:parameter>
<se:parameter name="inputdata">siblingsdata</se:parameter>
<se:parameter name="currentkey">{itemdata.number()}</se:parameter>
<se:parameter name="format">
<se:rowformat>
<a href="{channel.link(this.field(nr))}" title="{this.field(title)}">{this.field(display)}</a>
</se:rowformat>
<se:captionformat expression="this.rownr()==3">
{this.currentindex()} / {this.siblingcount()}
</se:captionformat>
</se:parameter>
</se:parameters>
</se:siblings>
|
Smartsite SXML |
Copy Code
|
<se:sitemap>
<se:parameters>
<se:parameter name="startitem">24665</se:parameter>
<se:parameter name="includeroot">false</se:parameter>
<se:parameter name="maxlevels">3</se:parameter>
<se:parameter name="format">
<se:rowformat>
<li>
<a href="{channel.link(this.field(nr))}">{this.field(title)}</a>
{this.childlevelresult()}
</li>
</se:rowformat>
<se:levelformat groupby="this.field(level)">
<ul>{this.levelresult()}</ul>
</se:levelformat>
</se:parameter>
<se:parameter name="resultformat"><ul>{this.result()}</ul></se:parameter>
</se:parameters>
</se:sitemap>
|
More examples
Placeholder Example
A placeholder is used create a facetted navigation to the result of an sqlquery macro.
Smartlet Example
An example of a Smartlet (combination of a translation and normal - mostly JSON/Ajax - rendering)