Dir and Join Example

The Join macro is used to combine a directory listing and a list of image items in the site database.

Smartsite SXML CopyCode image Copy Code
<se:dir path="/Functionaltests/ImageServer Demo Images" resulttype="datatable" save="files" />
<se:xlinks parent="17965" resulttype="datatable" save="items" />

<se:join inputtables="files,items">
    <se:parameters>
        <se:parameter name="format">
            <se:rowformat ><li>{this.field(location)}</li></se:rowformat>
            <se:rowformat expression="this.field(location) == ''"><li>{channel.link(this.field(nr))}</li></se:rowformat>
            <se:rowdelimiter>{char.crlf()}</se:rowdelimiter>
        </se:parameter>
        <se:parameter name="resultformat"><ul>{this.result()}</ul></se:parameter>
    </se:parameters>
</se:join>
Example Result CopyCode image Copy Code
<ul><li>/Functionaltests/ImageServer Demo Images/161880_6792.psd</li>
<li>/Functionaltests/ImageServer Demo Images/161881_3351.wmf</li>
<li>/Functionaltests/ImageServer Demo Images/161882_9139.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/227238_4928.png</li>
<li>/Functionaltests/ImageServer Demo Images/227254_1796.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/227975_1778.bmp</li>
<li>/Functionaltests/ImageServer Demo Images/232865_5630.gif</li>
<li>/Functionaltests/ImageServer Demo Images/238662_2197.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/239968_7269.tif</li>
<li>/Functionaltests/ImageServer Demo Images/240847_6569.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/241409_6250.png</li>
<li>/Functionaltests/ImageServer Demo Images/242969_6439.tga</li>
<li>/Functionaltests/ImageServer Demo Images/244193_5395.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/246569_7397.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/246657_5222.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/249554_4970.emf</li>
<li>/Functionaltests/ImageServer Demo Images/250273_2214.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/250280_8867.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/250331_3924.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/252452_8075.gif</li>
<li>/Functionaltests/ImageServer Demo Images/artstone.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/Bird.bmp</li>
<li>/Functionaltests/ImageServer Demo Images/Elephant.jpg</li>
<li>/Functionaltests/ImageServer Demo Images/giraffe.png</li>
<li>/Functionaltests/ImageServer Demo Images/Tiger.gif</li>
<li>/test.net?id=SMARTSITELOGO</li>
<li>/test.net?id=IMG_SCAS_0</li>
<li>/test.net?id=IMG_SCAS_1</li>
<li>/test.net?id=IMG_SCAS_2</li>
<li>/test.net?id=IMG_SCAS_NONE</li>
<li>/test.net?id=25480</li>
<li>/test.net?id=IXPERIONLOGO</li></ul>