We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39267
    • 50 Posts
    Hello guys,
    I'm not able to do any output with getRessources.

    Here is my config:

    PHP 5
    mysql 5.1
    apache 2.2.20
    modx revolution 2.2.0
    getresources-1.4.2-pl

    Here is my code:

    chunk thumbs:
    [[!getResources? &parents=`[[*id]]` &tpl=`thumbs_template` &showHidden`1` &includeTVs=`1` &processTVs=`1` &tvPrefix=``]]


    chunk thumbs_template:

    <div class="thumbs">
        <div class="thumbs_top"></div>
        <div class="thumbs_fond">
            <div class="thumbs_contenu">
                <div class="thumbs_contenu_in" style="top:-137px;">
                    <div class="thumbs_contenu_in_h">
                        <div class="thumbs_contenu_in_titre" style="top:-40px;">[[+pagetitle]]</div>
                        <div class="thumbs_contenu_in_hr_blanc"></div>
                        <div class="thumbs_contenu_in_hr_fonce"></div>
                        <div class="thumbs_contenu_in_desc">[[+description]]</div>
                    </div>
                    <div class="thumbs_contenu_in_b">[[+tv.Upload_thumbs]]</div>
                </div>
            </div>
        </div>
        <div class="thumbs_bot"></div>
        <div class="thumbs_titre">[[+pagetitle]]</div>
    </div>


    the only way i found to get an output is:

    [[!getResources? &parents=`[[+id]]` &tpl=`thumbs_template` &showHidden`1` &includeTVs=`1` &processTVs=`1` &tvPrefix=``]]


    but it's not what i want ^^ I want to output all childrens of my ressource 2

    Any ideas? [ed. note: mojomateo last edited this post 12 years ago.]
      • 19369
      • 1,098 Posts
      I am not sure whether I see the correct getResources call in your post. Use the code tag, not the quote tag for displaying the code. This forum "eats" MODX placeholders when code is not used.
        • 39267
        • 50 Posts
        Right thx. The first post is edited
          • 30912
          • 463 Posts
          What happens if you set &parents to &parents=`2` (i.e the ID bnumber of the parent) you might also think about adding &depth=`2` &limit=`20`
            • 39267
            • 50 Posts
            I tried like this:
            [[!getResources? &parents=`2` &tpl=`thumbs_template` &depth=`2` &limit=`20` &showHidden`1` &includeTVs=`1` &processTVs=`1` &tvPrefix=``]]


            Still nothing, I really can't understand that problem.
              • 39267
              • 50 Posts
              What is the difference between:
              [[+id]]
              and
              [[*id]]
              ?
              because i have an output with this:
              [[+id]]
                • 19369
                • 1,098 Posts
                What output do you have with this?
                [[+id]]

                If, for example, you place [ [+id] ] inside a chunk used by getResources, you have the id of the resource that it is calling, not the resource you are in. If you place [ [*id] ] you have the id of the page you are browsing at the moment.

                [ [+placeholderName] ] are used inside chunks requested by a snippet (like getResources or Wayfinder).
                  • 39267
                  • 50 Posts
                  by using:
                  [[+id]]

                  I get my main menu output and by using any kind of number or *id I get nothing.

                  Is there something I should do in my ressources?
                    • 38723
                    • 165 Posts
                    Where are you calling this chunk from?

                    Quote from: mojomateo at Apr 24, 2012, 12:03 PM


                    chunk thumbs:
                    [[!getResources? &parents=`[[*id]]` &tpl=`thumbs_template` &showHidden`1` &includeTVs=`1` &processTVs=`1` &tvPrefix=``]]


                      • 39267
                      • 50 Posts
                      from the parent ressource of the ones i want to display.

                      >the ressource i call the chunk
                      >>ressource i want to display
                      >>ressource i want to display
                      >>ressource i want to display

                      but even using:
                      &resources`20,21,22`

                      I don't get any results.