Sitemap with Selected Subfiles

Tables of contents created as in the above example with <npsobj list="toclist"> contain only files of types document, ressource and folder (see Components of Automatically Generated Tables of Contents). If the sitemap is also to list images, the field children must be read out instead.

In the following example a sitemap is created which depicts only images in a folder hierarchy:

<npsobj list="children">
  <npsobj name1="objType" value2="image" condition="isEqual">
    <p>
      <npsobj name="title" insertvalue="var"/>
    <br>
      <npsobj name="self" insertvalue="image"/>
    </p>
  </npsobj>
  <npsobj name1="objType" value2="publication" condition="isEqual">
    <npsobj name="sitemaptemplate" insertvalue="template"/>
  </npsobj>
</npsobj>

You can use the sitemap by inserting the code into a layout and calling the preview.