We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42970
    • 27 Posts
    I have this tree view:

    Hello,

    I have a problem with getResources. It doesn't fetch all the data.

    This is my code:

    (number) -> ID

    Sport(5)
    ----Football(6)
    ----Basketball(7)
    ----Volleyball(8)
    ----Handball(9)
    ----Rugby(10)
    ----American football(11)
    ----Tenis(12)
    ----Badminton(13)

    First chunk-"prog_box":

    <a href="index.php?id=[[+id]]">
    <div class="box_first box">
        <div class="box_title">
            <span>[[+pagetitle]]</span>
        </div>
        <div class="box_image">
            <img src="[[+tv.hidden_small_image_grupe]]" alt="" />
        </div>
    </div>
    </a>
    


    Second chunk-"prog_box_all":
    [[getResources? &parents=`5` &tpl=`prog_box` &includeTVs=`1` &processTVs=`1`]]
    // also tried to cache -> !getResources
    


    Template:
    ...
    [[$prog_box_all]]
    ...
    


    And it works fine but it only fetches 5 documents.

    What is the problem ?

    Thank you [ed. note: vucko2405 last edited this post 13 years, 6 months ago.]
      • 42970
      • 27 Posts
      I solved it, the default `limit` is 5.
      Is there a way to include all data without the `limit` because I don't know how many data will be?
        • 10208 ☆ A M B ☆
        • 1,780 Posts
        It doesn't say specifically in the docs, but you could try &limit=`0` for unlimited results. Otherwise, chose an arbitrarily high number (more than you think you'll ever have) and set that with the limit parameter.
          Frogabog- MODX Websites in Portland Oregon
          "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
          Having server issues? These guys have MODX Hosting perfected - SkyToaster
          • 42970
          • 27 Posts
          &limit=`0`
          


          Works. Thanks Frogabog. smiley
            • 10208 ☆ A M B ☆
            • 1,780 Posts
            Good to know it works (figured it did though, and I'll add that to the docs I think, for clarity purposes.). You can mark this as "solved" if you like :~}
              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster