We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39267
    • 50 Posts
    Hi,
    All of my getRessources call are perfect exept for one that display me the wrong ressources.

    I suspect the fact that this one is called by another, let me explain :

    > resource1 call (with gerResources) some resource with them content
    >> one of them call (with gerResources)some others and this one deliver the wrong resources

    Any ideas?
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Can you show your getResources calls and their tpls?
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 39267
        • 50 Posts
        Yep sorry for that and and the delay.

        resource(1) >> [[getResources? &parent=`1` &includeContent=`1` &tpl=`AccueilTpl` &depth=`1`]]
             resource(20) >> [[!getResources? &includeContent=`1` &parent=`20` &tpl=`NewsTpl` &depth=`1` &limit=`1`]]
                  resource(25)
                  resource(26)
                  resource(27)
             resource(22) >> [[!getResources? &parent=`20` &tpl=`ArchiveTpl` &depth=`1` &limit=`10`]]
             resource(23)
             resource(24)


        resource(1) getResource array me : 25,26,27,22 and not 23 and 24 but should not array me 25, 26, 27.
        I've tried to use &parent=`x` and the result is the same ...
          • 37242 ☆ A M B ☆
          • 339 Posts
          I am trying to understagd, what should output what:

          (1) -> 20,22,23,24 (no limitation, everything under (1), 1 level deep)
          (20) -> 25,26,27 (display only the first of them (limit=`1`))
          (22) -> 25,26,27,28,29.... (display up to 10 items under resource 20)

          I guess 20 is the news folder, right? Where you put the news.

          Questions:
          - In AccueilTpl, do you display [[*content]]? Does this [[*content]] contain the getResources call (20)?
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            Quote from: gallenkamp at Dec 26, 2012, 09:22 AM
            - In AccueilTpl, do you display [[*content]]? Does this [[*content]] contain the getResources call (20)?
            You mean [[+content]].

            I'm also confused by the various getResources calls, lol. Having the &tpl contents would really help.
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 37242 ☆ A M B ☆
              • 339 Posts
              Ah yes, content is inside a placeholder when displayed via getResources, right... smiley
                • 39267
                • 50 Posts
                hello,
                first I have understood that depth=`0` is the root and not `1` so that resolved a problem.
                Then i had a problem with the resource 22, so i've just rewrited the code character by character and then everything was working well.

                So it's resolved.

                Thank you.
                  • 37242 ☆ A M B ☆
                  • 339 Posts
                  Great!