We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    I can’t seem to get this to work with getResources.

    I have the following in my template:

    [[!getResources? &parents=`[[*id]]` &tpl=`site-list` &sortby=`menuindex` &tvPrefix=`` &includeTVs=`1` &processTV=`1` &showHidden=`true` &limit=`2` &pageVarKey=`page` &element=`getResources` &elementClass=`modSnippet`]]
     <div class="paging">  
          <ul class="pageList" style="clear: both;">  
    [[!+page.nav]]  
    </ul>  
    </div>


    In my site list template I have:

    <div>
      <div><img src="[[+image1]]" alt="[[+pagetitle]]" style="width: 118px; height: 118px;" /></div>
      <div><h3>[[+pagetitle]]</h3>
    [[+introtext]]
      </div>
    </div>


    The getResources shows what I want and limit’s it to 2 but the [[!+page.nav]] dosent render anything ( theres 10 items so I would expect 5 links to the next pages ), ohh and all pages are hidden from menu.

    Thanks for any help

    grin
      • 22840
      • 1,572 Posts
      Dosen’t matter, I should have been using [[!getPage? lol
        • 22840
        • 1,572 Posts
        Me Again grin

        Just a quick one though.

        Is it possible to get the pagination to always show all links, IE: First << 1 2 3 4 5 >> Last

        Also is it possible to show the following:

        Showing 1 - 5 of 25 Campsites | Page 1 of 5

        Thanks
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: paulp at Aug 15, 2010, 08:14 AM

          Is it possible to get the pagination to always show all links, IE: First << 1 2 3 4 5 >> Last
          No, but you can adjust the pageLimit property; by default it is 5 which means only 5 pagination links will show.

          Quote from: paulp at Aug 15, 2010, 08:14 AM

          Also is it possible to show the following:

          Showing 1 - 5 of 25 Campsites | Page 1 of 5
          You can add something like this to your content for the page x of y:
          Page [[!+page]] of [[!+pageCount]]
          

          I think the showing x to y of z part is going to require some additional properties to be set by getPage itself.
            • 21193
            • 9 Posts
            Nobody can put some good documentation for getPages???
            What parameters it have?
            For ex. how can I make some like this ditto call?
            [!Ditto? &documents=`5`!]

            Help please!
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: neopablix at Aug 30, 2010, 02:14 PM

              Nobody can put some good documentation for getPages???
              What parameters it have?
              For ex. how can I make some like this ditto call?
              [!Ditto? &documents=`5`!]

              Help please!

              getPage does not replace Ditto; see the documentation for getResources which includes an example of using it with getPage for pagination.