We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Right, i’ve got it to pull all documents under the paid and free cats however I only want it to pull from the paid section. I’m using the following call
    [!Ditto? &tpl=`paid_advert` &parents=`[[UltimateParent?&topLevel=`3`]] &depth=`2` &debug=`1`!]

    I really don’t understand why this wont work for me.

    Any more advise in helping me resolve this would be great
      • 22840
      • 1,572 Posts
      Right I’ve been realy simple here and think I have done this completley wrong.

      Let me explain the setup I have, the doc tree is as below:
      parent cat
      --pubs
      ----free advert
      ------doc 1
      ------doc2
      ----paid advert
      ------doc 1
      ------doc2

      Now all the sub cats I have will have that structure and I need to use 2 ditto calls so that the first will display the free adverts, the second will display the paid adverts.

      Now all is as above but I have just realised that the page that is pulling this data in is the Pubs page, therefore in my calls I was calling the ultimate parent and tecnicley that was pulling the correct data, what I actually need is for it to pull from free adverts when looking at the Pubs page.

      I think / hope Ive made that clear huh
        • 22840
        • 1,572 Posts
        Sorted grin

        Once I realised that the page being viewed was the pubs page I used the following call
        [[Ditto? &tpl=`paid_advert` &parents=`[*startid_paid*]`!]

        Then just added the tv data in the pubs document and all worked grin

        Just deleted about 20ish templates and the site is now running off 5 shocked shocked shocked
          • 7231
          • 4,205 Posts
          Glad you sorted it out. Hope you have a few hairs left after this process wink
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 22840
            • 1,572 Posts
            Just a few, but it will save me a lot of work so worth it.

            thanks allot for the help.