We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 999
    • 67 Posts
    Hi,

    I need to create the following.

    I have a folder which contains other folders. Each folder is a music album. In each music album folder reside documents, 1 document per track of the album.

    Albums--
    Album01--
    Track A
    Track B
    Album02--
    Track A


    etc.

    I want to create 1 xml file like this:

    <Albums>
    <Album title="asdasdsa">
    <Tracks>
    <Track title="aaaa">
    <Track title="aaaa">
    </Tracks>
    </Album>
    <Album title="asdasdsa">
    <Tracks>
    <Track title="aaaa">
    <Track title="aaaa">
    </Tracks>
    </Album>
    ....etc


    Any help would be aprecciated. i tried with ditto, but i succeeded displaying only the album data. i dont know how to read the track data of the album, or better, i dont know how to read the documents in each folder that ditto descents.


    Alex.
      • 15987
      • 786 Posts
      Since Wayfinder uses templates this should be easy to do with it.

      you would set the startId to the albums folder id and then specify the chunks below.

      here are some chunks that might work:

      &outerTpl

      <Albums>
         [+wf.wrapper+]
      </Albums>
      


      &rowTpl

      <Album title="[+wf.title+]">
         [+wf.wrapper+]
      </Album>
      


      &innerTpl

      <Tracks>
        [+wf.wrapper+]
      </Tracks>
      


      &innerRowTpl

      <Track title="[+wf.title+]">