We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8548
    • 104 Posts
    Hi, is it possible to use Cliche with GetPage for pagination so we can display X number of images per page.

    I've tied this :
    [[!getPage? &element=`ClicheAlbum` &limit=`3` &id=`1` &view=`image` &thumbWidth=`200` &thumbHeight=`150` &itemTpl=`item.tpl` &wrapperTpl=`wrapperTPL` &loadJquery=`0` &loadCss=`0` &columnBreak=`` &js=`cliche-js`]]


    but it displays all the images in the specified gallery id not the 3 that are asked with "limit".

    any guidace on this would be apreciated.


    cheers,
      • 34049
      • 28 Posts
      Hi,

      I've just started using cliche extra and found that it has pagination built into the default plugin.

      [[!Cliche?
          &id=`1`
          &view=`album`
          &columns=`4`
          &js=`cliche-js`
          &itemTpl=`cliche-itemTpl`
          &wrapperTpl=`cliche-albumTpl`
          &paginate=`12`
      ]]


      This will put 12 images per page.
      You need to create a new wrapperTpl to insert various placeholders for navigation

      [[+cliche.page_link_prev]]
      [[+cliche.current_page]]
      [[+cliche.page_link_next]]
      [[+cliche.last_page]]
      


      The page_link items provide the html with a hyperlink to the previous or next page. current page and last page provide the relevant numbers.
        • 34049
        • 28 Posts
        Quick update, I've sorted out a little navigation bar for the pagination for an example.

        This is my wrapperTpl template. It prints "Page 2 of 6" and links for previous and next page. Also used output modifiers to insert links for ":First:" and ":Last:" page which disappear if on the page in question.

        <div class="cliche galleryid-[[+id]]" id="album-[[+id]]">
            <p>Page:[[+cliche.current_page]] of [[+cliche.last_page]] 
        	[[+cliche.current_page:gt=`1`:then=`<a href=[[~[[*id]]]]&page=1> :First: </a>`]]
        	[[+cliche.page_link_prev]] 
        	[[+cliche.page_link_next]] 
        	[[+cliche.current_page:notequalto=`[[+cliche.last_page]]`:then=`<a href=[[~[[*id]]]]&page=[[+cliche.last_page]]> :Last: </a>`]]</p>
            [[+items]]
        </div>
        <!-- End #album-[[+id]] -->
        
          • 43864
          • 151 Posts
          Hey Andrian, anyway you can help me with this?

          http://forums.modx.com/thread/88536/sort-albums-in-cliche#dis-post-487061

          Thx!
            • 42625
            • 9 Posts
            Hi!
            I just find out cliche pagination through this post. I thought to use it to display only the first image of an album (having failed to find how to display only the album cover). But when the limit is 1, the 2nd picture appears!
            [[!Cliche?
            	  &id=`1`
            	  &view=`album`
            	  &itemTpl =`cliche_cover_tpl`
            	  &paginate=`1`
            	]]

            I do not understand why… Does anybody can help me?

            Thanks