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

    I’m trying to export xml file for each of my gallery in one file, but I can’t make it....
    Example:
    I have 10 gallerys with id 10,11,12,13,14,15...20 with subgallerys
    And I want to export xml file like:
    <response>
    <source id="10">//main gallery
    <subgallery id=23>//sub gallery
    <image="http://www.site.com/assets/galleries/23/echobot.jpg">
    <title>ne</title>
    </subgallery>
    <subgallery id=24>
    <image="http://www.site.com/assets/galleries/24/echobot.jpg">
    <title>ne</title>
    </subgallery>
    </source>
    <source id="11">//main gallery
    <subgallery id=44>//sub gallery
    <image="http://www.site.com/assets/galleries/44/echobot.jpg">
    <title>ne</title>
    </subgallery>
    <subgallery id=45>
    <image="http://www.site.com/assets/galleries/45/echobot.jpg">
    <title>ne</title>
    </subgallery>
    </source>
    </response>

    So the final (point for me) of having this xml doc of all gallerys is to use it as feed for flash
    Hope that somebody can help....
    Thanks
    Davor
      • 7923
      • 4,213 Posts
      List the gallery documents with Wayfinder and use maxigallery in wayfinder template to list the images. Do custom templates to both to get the output you need.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 6354
        • 9 Posts
        I’m still struggeling....
        Can you give some example....
        I try this:
        The one gallery is under the id 48 and conetain gallery of 6 fotos.
        in the new document that is xml doc with id 47 has next line:
        [!Wayfinder? &startId=`48`&rowTpl=`gallery1`!]

        rowTpl=’gallery1’ have chunk that looks like next:
        <gallery>
        <imges src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]"
        title="[+maxigallery.picture.title:htmlent+]
        [+maxigallery.strings.click_to_zoom+]"
        alt="[+maxigallery.picture.title:htmlent+] />
        </gallery>

        And I expected from xml doc (id 47) to give me xml doc with parameters like in chunk, but it doesn’t work...
        can you help....
          • 7923
          • 4,213 Posts
          If you have all the galleries under document with ID 48, you need to do following:

          Actually because you want the first level to be wrapped in "source" tag and each below that wrapped in "subgallery" tag, you need 2 wayfinder calls, otherwise one should have been enough. I don’t know if this works (I only write it, you have to debug it), but it’s a start.

          In the XML document, have the following call:

          [!Wayfinder? &startId=`48` &level=`1` &outerTpl=`wfMaxiOuterSource` &rowTpl=`wfMaxiRowSource`!]

          wfMaxiOuterSource chunk:
          <response>
              [+wf.wrapper+]
          </response>
          


          wfMaxiRowSource chunk:
          <source id="[+wf.docid+]">
              [!Wayfinder? &startId=`[+wf.docid+]` &level=`1` &outerTpl=`wfMaxiOuterSubgallery` &rowTpl=`wfMaxiRowSubgallery`!]
          </source>
          


          wfMaxiOuterSubgallery chunk (empty):


          wfMaxiRowSubgallery chunk:
          <subgallery id="[+wf.docid+]">
              [!MaxiGallery? &view_gallery=`[+wf.docid+]` &galleryOuterTpl=`maxiOuter` &galleryPictureTpl=`maxiGalleryPic`!]
          </subgallery>
          


          maxiOuter chunk:
          [+maxigallery.pictures+]
          


          maxiGalleryPic chunk:
          <image="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]">
          <title>[+maxigallery.picture.title:htmlent+]</title>
          


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."