We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39267
    • 50 Posts
    yes the rest is working
    my main problem is about:
    &parents=`2`
    How to make an array of all child of the ressource 2
      • 38723
      • 165 Posts
      Quote from: Tyreal2012 at Apr 24, 2012, 02:59 PM

      Note the change of &parents, by setting it as [[*id]] im saying look at the current page id im on
      This is how I would do it as well. Once the call for getResources is in the template directly, use:

      &parents=`[[*id]]`
      


      For it to automatically use the current page ID as the resource to pull the child pages from.

      Quote from: Tyreal2012 at Apr 24, 2012, 02:59 PM

      pdincubus: good spot!
      Ta! smiley

      Quote from: mojomateo at Apr 24, 2012, 03:01 PM
      yes the rest is working
      my main problem is about:
      &parents=`2`
      How to make an array of all child of the ressource 2

      Not sure why this isn't working but everything else is, I'm sure you can use &parents with &resources but I would usually only use &parents with a &limit and a &sortby to get what I want - and maybe &depth at a push! It's rare I would use &resources
        • 30912
        • 463 Posts
        using &parents and &resources will only bring back the resources with said id's

        I think theres more to this problem that we are seeing, which without CMS access is obviously hard to troubleshoot, but I think that its soemthing to dow ith the templates in the CMS and the call within it. In the past I have used 2 templates to deal with nesting as it was easier for the client, i think this might be one of those situations that the calls NEED to be on a template level and not in the Chunk at all.

          • 39267
          • 50 Posts
          i'm calling it from the ressource now and not from the chunk and it do not work.

          I think it's a php problem or a bad installation of modx... I have tried everything
            • 38723
            • 165 Posts
            I would definitely put the getResource call into the template, and not a chunk or resource.
            Remove the &resources and replace with &parents as before and make sure that the tv. part is removed from the chunk you are using for the output.

            Screenshots or code pastings of what you're seeing manager side might help us, as without access to the manager it's kind of hard to track down.

            Are you seeing any errors in the error log? You can also call getResources and miss out the &tpl part which will just dump results to screen without formatting. this can be useful to see if anything is missing!
              • 30912
              • 463 Posts
              Agreed, we need to see whats going on in the back end, If you want I could have a quick look for you if you wanted to Pm the access details.
                • 30912
                • 463 Posts
                So, I had a look, before it all died on me( you changing something?)

                and it was so simple, i cant belive we all missed it form the first post.

                Original from post #1
                [[!getResources? &parents=`[[*id]]` &tpl=`thumbs_template` &showHidden`1` &includeTVs=`1` &processTVs=`1` &tvPrefix=``]]


                should be &showHidden=`1`

                The call itself is fine, as long as the sytnax is correct (its been along day here at the office )
                  • 38723
                  • 165 Posts
                  Yep, just seen PM come through - was definitely the getResources call that was the problem! smiley
                    • 30912
                    • 463 Posts
                    apologies for it taking so long, ive been starting at getresources all day anyway - note to self look at calls more closely.
                      • 38723
                      • 165 Posts
                      Also noticed that the reason that the TVs aren't appearing even though &tvPrefix is not there any more is because the TV wasn't set to appear on those portfolio child pages. I created you a portfolio-item template, you will need to apply that to the child pages so that the TV will appear when you edit the page - basically it's not appearing from getResources because it's empty as it doesn't exist for those pages yet wink

                      Hope this helps!