We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    That’s definitely a bug; &parents does not currently allow an empty value to be set, and so uses the current page by default. Please enter an issue for this at GitHub so it gets resolved quickly.
      • 19604 ☆ A M B ☆
      • 179 Posts
      Quote from: OpenGeek at Nov 05, 2010, 05:02 PM

      That’s definitely a bug; &parents does not currently allow an empty value to be set, and so uses the current page by default. Please enter an issue for this at GitHub so it gets resolved quickly.
      The current getResources 1.2.2-pl is suffering from that bug (thus driving me crazy while testing all kind of variations etc. Until I found this thread ;-).
      I don’t get the issues in GitHub: Did I miss the fix? Is there a chance of an update soon?

      In the meentime I found something like a workaround: same &parents as &resources
      [[getResources? &parents=`[[*related]]` &resources=`[[*related]]` &tpl=`relatedTPL`]]

      Does it for me for now but does not work, if the children of [[*related]] are NOT to be included. That will soon be a problem for my project.
      So, I would love to see an update for the amazing getResources soon! Any chance?
        MINDEFFECTS – DESIGN for PRINT, WEB and MEDIA
        http://twitter.com/mindeffects · http://www.facebook.com/mindeffects · http://www.youtube.com/mindeffects/ · skype://mindeffects_oliver
        • 19604 ☆ A M B ☆
        • 179 Posts
        Quote from: mindeffects at Feb 15, 2011, 03:56 AM

        In the meentime I found something like a workaround: same &parents as &resources
        [[getResources? &parents=`[[*related]]` &resources=`[[*related]]` &tpl=`relatedTPL`]]

        Does it for me for now but does not work, if the children of [[*related]] are NOT to be included.

        Even better: Just select a &parent which definetly does not have any kids, like the error-page or whatever. I &parents does not have kids it delivers an empty result, so it’s being ignored. Perfect!

        Still, I would like an update even more. ;-)
          MINDEFFECTS – DESIGN for PRINT, WEB and MEDIA
          http://twitter.com/mindeffects · http://www.facebook.com/mindeffects · http://www.youtube.com/mindeffects/ · skype://mindeffects_oliver
          • 19604 ☆ A M B ☆
          • 179 Posts
          Quote from: mindeffects at Feb 15, 2011, 04:16 AM

          Even better: Just select a &parent which definetly does not have any kids, like the error-page or whatever. I &parents does not have kids it delivers an empty result, so it’s being ignored. Perfect!
          OK, I found another solutions, which works best for me:
          [[getResources? &parents=`-1` &resources=`23,45,56` &tpl=`relatedTPL`]]

          By setting &parents to "-1" you only get the results from &resources. Bam! How cool’s that?
            MINDEFFECTS – DESIGN for PRINT, WEB and MEDIA
            http://twitter.com/mindeffects · http://www.facebook.com/mindeffects · http://www.youtube.com/mindeffects/ · skype://mindeffects_oliver
            • 3749
            • 24,544 Posts
            What happens if you set &parents=`99999` ?

            It really should work with no &parents parameter, but I haven’t looked at the code.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 19604 ☆ A M B ☆
              • 179 Posts
              Quote from: BobRay at Feb 16, 2011, 08:25 PM

              What happens if you set &parents=`99999` ?
              "9999" is also fine, just like any non existing id. I just liked "-1" a lot bettet, since you will never run into conflicts even if the id is used one day (before the update ;-)
              Quote from: BobRay at Feb 16, 2011, 08:25 PM

              It really should work with no &parents parameter, but I haven’t looked at the code.
              The workaround is fine, but the "autofetch id" should not be removed since some user may already be using it. Perhaps a parameter like ’FALSE’ or ’’ (empty) should be possible AND documented. This way, the old users would be happy because their sites won’t break, and the "new" user would be able to do what they intended to do.
                MINDEFFECTS – DESIGN for PRINT, WEB and MEDIA
                http://twitter.com/mindeffects · http://www.facebook.com/mindeffects · http://www.youtube.com/mindeffects/ · skype://mindeffects_oliver