We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15022
    • 31 Posts
    Perhaps the &depth=`2` is picking up the parent page of the images and therefore giving you a blank.
    What about creating a special template for all of your images that contains a TV to hold what parent page it belongs with.
    Then place all of your images in that template under one container page.
    Then call ditto from the same parent page each time and either filter on the TV or use tagging to display the images associated with each page.
    Make sense?
      illegitimati non carborundum
      • 10780
      • 69 Posts
      Kind of makes sense.

      But I’m so close to this working.

      Right to look at your filter example, when I create an image I would need to assign it to a page right? Then in the template how would I filter to that page?
        • 15022
        • 31 Posts
        Let’s say you name your template variable "belongsTo" and set it for each of your image resources. So each image now knows what page it is associated with.

        Your Ditto call could be:
        [[Ditto? &parents=`id of image container page` &tpl=`slideshow` &filter=`belongsTo,[*id*],1`]]


        So this means "exclude child resources of page parent (image container) which are not equal to the current page id". I haven’t tried it but I think this can work for your situation. Let us know how it turns out.
          illegitimati non carborundum
          • 10780
          • 69 Posts
          Right, it seems because I have an empty template/container called Heroes. The ditto is picking that up as an image resource.

          So I need to exclude that. Going to work on that first and then see about the filter method.
            • 10780
            • 69 Posts
            Quote from: juliebug at Jun 11, 2010, 08:29 AM

            Let’s say you name your template variable "belongsTo" and set it for each of your image resources. So each image now knows what page it is associated with.

            Your Ditto call could be:
            [[Ditto? &parents=`id of image container page` &tpl=`slideshow` &filter=`belongsTo,[*id*],1`]]


            So this means "exclude child resources of page parent (image container) which are not equal to the current page id". I haven’t tried it but I think this can work for your situation. Let us know how it turns out.


            Ok, going to try this method. I’m not going to be filtering to a specific ID number, I would want to filter against say Accomodation, so if I am Accommodation page, show images that are tagged with Accommodation.
              • 10780
              • 69 Posts
              Or could I just add the images as resources to the actual pages and tag them with say image, so if image then display.
                • 10780
                • 69 Posts
                Created a TV checkbox and if checked it displays.


                [[Ditto? &tpl=`hero-slides` &depth=`2` &filter=`display,yes,1` &orderBy=`menuindex ASC` ]]



                Seems to work now.