We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42701
    • 47 Posts
    I'm having trouble with a getResources call. It should start at the top of the resource tree and display each immediate child. Here's the resource tree:

    Parent Resource (id is 1)-
       -Resource 1
       -Resource 2
       -Resource 3
       -Resource 4
       -Resource 5
       -Resource 6
          -SubResource 1
          -SubResource 2
       -Resource 7


    [[!getResources? 
    &parents=`1`
    &depth=`depth`
    &limit=`0`
    &tplFirst=`Section1` 
    &tpl_2=`Section2` 
    &tpl_3=`Section3` 
    &tpl_4=`Section4` 
    &tpl_5=`Section5` 
    &tpl_6=`Section6` 
    &tpl_7=`Section7`  
    &includeTVs=`1` 
    &processTVs=`1` 
    &includeContent=`1`
    ]]


    It is using the template chunks in the right order, but the resource info, including the TVs, are all over the place.

    Anyone know why this GR call isn't grabbing the content in the right order? Thanks in advance.
      • 42701
      • 47 Posts
      Solved: adding sortorder=`menuindex` and sortdir=`ASC` did the trick.

      Quote from: zcmodxuser at Sep 24, 2013, 12:14 PM
      I'm having trouble with a getResources call. It should start at the top of the resource tree and display each immediate child. Here's the resource tree:

      Parent Resource (id is 1)-
         -Resource 1
         -Resource 2
         -Resource 3
         -Resource 4
         -Resource 5
         -Resource 6
            -SubResource 1
            -SubResource 2
         -Resource 7


      [[!getResources? 
      &parents=`1`
      &depth=`depth`
      &limit=`0`
      &tplFirst=`Section1` 
      &tpl_2=`Section2` 
      &tpl_3=`Section3` 
      &tpl_4=`Section4` 
      &tpl_5=`Section5` 
      &tpl_6=`Section6` 
      &tpl_7=`Section7`  
      &includeTVs=`1` 
      &processTVs=`1` 
      &includeContent=`1`
      ]]


      It is using the template chunks in the right order, but the resource info, including the TVs, are all over the place.

      Anyone know why this GR call isn't grabbing the content in the right order? Thanks in advance.