We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29839 ☆ A M B ☆
    • 66 Posts
    I would like to know how i can get multiple calls to work on one page.

    I’m using Jquery tabs to load the tabs, and i placed 2 different calls in each tab but only one of the is working. I tried to ad "&id=`whatever`" to the calls without luck.

    Is there a solutions for this? Searched this forum but could not anything.

    Thanks in advance,
      • 11076
      • 159 Posts
      I think it’s probably a jQuery issue rather than getResources & getPage.
        Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...
        • 29839 ☆ A M B ☆
        • 66 Posts
        The problem is the [[!getResourcesTag?]] call, this is not working when i place 2 of those on the same page.

        I need this call to be able to filter by tags all within the same page.

        My goal is to have a catalogue page that can filter the displayed products, by type, category, tags etc. I’d realy like this to be possible all on the same page. I’m thinking of a checkbox filter.

        The setup i’m using is:

        Home
        -Ladies
        --Athletic
        ---product 1
        ---product 2
        ---product 3
        --Work
        --Casual
        -Gents
        --Athletic
        --Work
        --Casual

        Any help to get me going is very much appreciated.
          • 8975
          • 51 Posts
          I’m really interested in the same problem.
          I have multiple call in a page to getpage, because I need to show news from different places in the same page on different positions.

          So I created the following code in template:

          <div id="novita">
          <h1>NOVIT&Agrave;</h1>
          [[!getPage?
          &elementClass=`modSnippet`
          &element=`getResources`

          &parents=`3`
          &depth=`1`
          &limit=`6`
          &pageVarKey=`page`
          &includeContent=`0`
          &tpl=`novitas`
          ]]
          </div>
          <div id="verticalleft">
          [[*verticalleft]]
          </div>
          </div>

          <!-- CONTENT -->
          <div id="content">
          [[!getPage?
          &elementClass=`modSnippet`
          &element=`getResources`
          &parents=`27`
          &depth=`1`
          &limit=`2`
          &pageVarKey=`page`
          &includeContent=`1`
          &tpl=`areastud`
          ]]

          [[!getPage?
          &elementClass=`modSnippet`
          &element=`getResources`
          &parents=`8`
          &depth=`2`
          &limit=`4`
          &pageVarKey=`page`
          &includeContent=`1`
          &tpl=`articolo`
          ]]
          [[*content]]

          </div>


          The problem is that the news are functioning (first call), while the others show the first news, the same on the news sidebar.
            Graphic designer, Web designer, Illustrator and Boardgames designer (and illustrator)
            See my illustrations here: http://erebus74.deviantart.com/gallery/
            • 22303 MODX Staff
            • 10,725 Posts
            You’ll have to change many of the variables for each call, such as pageVarKey and totalVar and pageNavVar. Otherwise one instances REQUEST variables will rule them all (and screw up the results).
              • 8975
              • 51 Posts
              Probably I’ve not understood how getResources works, I’m not a programmer so I have an hard time in understanding some functions if they are not well explained and illustrated with examples.

              Now I’ve made it work, just by replacing with getPage. That is what I needed to do: show the articles on the page.

              Still I keep the doubt: what getResources do? I hope we will get soon a good manual on those more esoteric functions, for us webdesigner guys wich are not fully into programmation ^___^


              Best Regards.
                Graphic designer, Web designer, Illustrator and Boardgames designer (and illustrator)
                See my illustrations here: http://erebus74.deviantart.com/gallery/
                • 965
                • 3 Posts
                same problem...
                [MODx Revolution 2.0.7-pl (traditional) / getResources 1.2.2-pl / getPage 1.0.0-pl]
                using 2 calls of getPage on page with different &totalVar, &pageVarKey :

                [[!getPage?
                   &elementClass=`modSnippet`
                   &element=`getResources`
                 
                   &parents=`32`
                   &depth=`2`
                   &limit=`1`
                   &pageVarKey=`page`
                   &totalVar=`total`
                
                   &includeTVs=`1`
                   &includeContent=`1`
                 
                   &tpl=`blogListPost`
                ]]
                
                [[!getPage?
                   &elementClass=`modSnippet`
                   &element=`getResources`
                 
                   &parents=`10`
                   &depth=`2`
                   &limit=`1`
                   &pageVarKey=`pagenews`
                   &totalVar=`totalnews`
                 
                   &includeTVs=`1`
                   &includeContent=`1`
                 
                   &tpl=`newsListPost`
                ]]
                


                As result : two same post from first call getPage (and with &tpl from first call too)... huh

                first post with tpl=blogListPost and parents=32
                second post with tpl=bloglistPost and parents=32

                must be:
                first post with tpl=blogListPost and parents=32
                second post with tpl=newsListPost and parents=10

                Help me please with this problem!
                  • 22303 MODX Staff
                  • 10,725 Posts
                  You have to change pageNavVar, as suggested.
                    • 965
                    • 3 Posts
                    Quote from: OpenGeek at Mar 11, 2011, 08:22 AM

                    You have to change pageNavVar, as suggested.
                    No effect... Problem is not resolved. Have others proposal?
                      • 22303 MODX Staff
                      • 10,725 Posts
                      Quote from: alexbaxter at Mar 12, 2011, 06:32 AM

                      Quote from: OpenGeek at Mar 11, 2011, 08:22 AM

                      You have to change pageNavVar, as suggested.
                      No effect... Problem is not resolved. Have others proposal?
                      Well, what is the problem? There are folks that have gotten multiple instances to work, so I’m not sure what problems you are having. Have you tried using the namespace?