We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
    Quote from: sarah_77 at Feb 16, 2010, 03:08 PM

    [[getResources?
    &parents=`12`
    &sortby=`createdon`
    &sortdir=`DESC`
    &tpl=`tplNews`
    ]]

    Dont forget the !: [[!getResources]], for one.

    Does it work if you remove the sortby clause?
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 26192
      • 91 Posts
      I had tried with ! bacause I seen examples with ! but I still show empty area

      [[Ditto? &parents=`12` &tpl=`tplNews` ]]

      [[!getResources?
      &parents=`12`
      &tpl=`tplNews`
      ]]

        • 17230
        • 35 Posts
        splittingred:

        I thought it would be better to call that one uncached, so I added "!" already wink

        And yes, it works just the way it should even without the sortby & sortdir clauses.

        I had to add
         &includeTVs=`1`
        &includeContent=`1`


        though to get it working with my chunks.

        My complete uncached (working) Snippet Call is thus as follows:
        [[!getResources?
          &parents=`8`
          &limit=`3`
          &tpl=`DittoNewsTpl`
          &tplLast=`DittoNewsTplLast`
          &includeTVs=`1`
          &includeContent=`1`
          &tvPrefix=``
        ]]


        Cheers, Paul
          - Just because you're not paranoid doesn't mean they're not after you -
          • 28215
          • 4,149 Posts
          Quote from: sarah_77 at Feb 16, 2010, 03:30 PM

          I had tried with ! bacause I seen examples with ! but I still show empty area

          [[Ditto? &parents=`12` &tpl=`tplNews` ]]
          [[!getResources?
          &parents=`12`
          &tpl=`tplNews`
          ]]

          Sarah, what’s in that tplNews chunk?
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 26192
            • 91 Posts
            Quote from: splittingred at Feb 16, 2010, 03:51 PM

            Quote from: sarah_77 at Feb 16, 2010, 03:30 PM

            I had tried with ! bacause I seen examples with ! but I still show empty area

            [[Ditto? &parents=`12` &tpl=`tplNews` ]]
            [[!getResources?
            &parents=`12`
            &tpl=`tplNews`
            ]]

            Sarah, what’s in that tplNews chunk?


            <h3><a href="[[~[[+id]]]]" title="[[+title]]">[[+title]]</a></h3>
            <p>[[+introtext]]</p>
            <p>[[+truncText]]</p>
            <a href="[[~[[+id]]]]" title="[[+title]]">Continue...</a>




              • 28215
              • 4,149 Posts
              Quote from: sarah_77 at Feb 16, 2010, 03:58 PM

              <h3><a href="[[~[[+id]]]]" title="[[+title]]">[[+title]]</a></h3>
              <p>[[+introtext]]</p>
              <p>[[+truncText]]</p>
              <a href="[[~[[+id]]]]" title="[[+title]]">Continue...</a>






              Should be:

              <h3><a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle]]</a></h3> 
              <p>[[+introtext]]</p>
              <p>[[+content:limit=`50`]]</p>
              <a href="[[~[[+id]]]]" title="[[+pagetitle]]">Continue...</a>
              <br /><br /><br /><br />
              

                shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                • 26192
                • 91 Posts
                Nothing... same problem :-((

                empty page :-(
                  • 28215
                  • 4,149 Posts
                  Is this in a Resource? Is the Resource cached? What else is in the Resource?
                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                    • 26192
                    • 91 Posts
                    Quote from: splittingred at Feb 16, 2010, 04:55 PM

                    Is this in a Resource? Is the Resource cached? What else is in the Resource?


                    Yes it’a resource!!

                    and in the same page the Ditto tag works!!

                    if I insert the getResources tag I show empty page

                    I’ve tried to clear cache!

                    Thanks
                      • 3749
                      • 24,544 Posts
                      Sara: You’ve probably done this already, but just in case . . .check the spelling of the snippet name and the Tpl chunk name in the tag versus the actual names of the elements. They’re case-sensitive. It’s the only thing I can think of that would cause what you’re seeing (other than a bad download of getResources).
                        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