We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38141
    • 7 Posts
    Hello!

    I installed new modx 2.2.0 rc3 and addon "getResourses" (last available). Any calling of this addon shows nothing. F.e.
    [[!getResources? &parents=`3`  &tpl=`testpost`]]


    I have resourse with id=3 and chuck named "testpost".

    What can be the reason of it? Addon doens't supports this version or something else?
    [ed. note: givemesomedrugs last edited this post 14 years, 10 months ago.]
      • 31946
      • 116 Posts
      It works for me. Can you post your getResource call?
      Use the "Insert Code" from the toolbar above, otherwise code gets stripped.
        • 38141
        • 7 Posts
        Sorry for my mistake. Here is the call
        [[!getResources? &parents=`3`  &tpl=`testpost`]]
          • 3749
          • 24,544 Posts
          Post your testpost chunk content.
            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
            • 38141
            • 7 Posts
            <div class="post">
                <div class="post-title">
                    <a href="[[~link]]">[[*pagetitle]]</a>
                </div>
                <div class="post-content">
                    [[*introtext]]
                </div>
                <div class="comments">
                    <a href="[[~link]]#comments">Comments</a>
                </div>
            </div>
            [ed. note: givemesomedrugs last edited this post 14 years, 10 months ago.]
              • 38142
              • 91 Posts
              In chunks, don't use the asterisk - use the plus sign.

              [[+pagetitle]]
              [[+introtext]]
              [[~[[+id]]]]
              


              What drugs?
                • 38141
                • 7 Posts
                Thx, but it still shows nothing instead of 3 times showing code of chunk (resource with id=3 has 3 child resources.
                What drugs?
                Any)
                  • 38142
                  • 91 Posts
                  Tricky.

                  If I remember from my experience with getResources, if there is a problem with the chunk, the snippet returns a huge mass of info about all the relevant resources. If I am correct there, and if you are getting a blank screen, then the problem is not with the chunk but with the snippet call or the snippet itself. So before looking into the more complex alternatives, how about double checking the blindingly obvious, such as:

                  1. Spelling of getResources (in your initial question there is a mispelling).

                  2. Whether getResources is actually installed (as opposed to having just been downloaded).

                  3. Whether the id of the parent resource is actually 3.

                  4. Whether the parent resource has actually been published (otherwise you need to tell getResources to show hidden resources).
                    • 9102 ☆ A M B ☆
                    • 318 Posts
                    Do the child resources have "hide from menus" checked? If so try this:

                    [[!getResources? &parents=`3`  &tpl=`testpost` &showHidden=`1`]]
                    
                      • 3749
                      • 24,544 Posts
                      It the output actually shows the raw code of the chunk in a normal page view, it's likely that the chunk's code has been converted to html entities somehow. Are you using TinyMCE to edit the chunk?
                        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