We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25803 ☆ A M B ☆
    • 721 Posts
    Hello,

    I have gotten pagination to function with this call:

    <!-- Gallery Start -->
    <div id="gallery">
    [[!getPage?
      &elementClass=`modSnippet`
      &element=`getResources`
      &parents=`[[*id]]`
      &depth=`1`
      &sortby=`[[*menuindex]]`
      &sortdir=`ASC`
      &tpl=`imageTpl`
      &includeTVs=`1`
      &limit=`1`
      &tvPrefix=``
      &pageLimit=`10`
    ]]
      <div class="navleft">
        <div class="gallerynavigation">
          <ul>[[!+page.nav]]</ul>
        </div>
      </div>
    </div>
    <!-- Gallery End -->


    Which is good, it shows one image and give me pagination for all of the image in this section.
    The pagination is default of course with this format (with say 3 selected):

    First << 1 2 3 4 5 >> Last

    I need it to be like this (in a list is fine):

    « » 1 2 3 4 5

    With no First or Last.

    Reading the documentation, I gather I need to make a new property set (called palette) for the getPage snippet and modify that and then refer to it with [[!getPage@palette? in the call.

    I went into the getPage snippet and:


    • Selected Properties (the documentation says Element Properties tab, but I gather the ’Element’ part was dropped since I don’t see an Element Properties tab).
    • Selected Add Property Set
    • Clicked Create New Property Set
    • Gave it a name: palette and a description: palette gallery pagination
    • Changed the << and >> as starting point to &laquo; and &raquo; as well as First and Last to Last Image and First Image just to see if the changes took effect before figuring out how to change the order of the next and last indicators and how to eliminate first and last text altogether.
    • Saved the property set.
    • Changed the snippet call by adding @palette after getPage.
    • Cleared cache.
    • Cleared browser cache.
    • No change in the pagination.

    Ok, so I went page to the getPage snippet and clicked the Properties tab. I’m presented with the default. I click the drop down to select my one property set. It doesn’t exist in the drop down. So I think I haven’t saved it properly. So I create a new set, with the same name, and I’m told it already exists. I can’t get at it to edit though. So I try three more times with 3 different property set names and the same results each time.

    How does one edit a custom property set? Any reason why it wouldn’t show up in the drop down?

    Furthermore, does anyone have any idea how I would make the pagination to the spec needed once I can create and edit a property set? I basically need it to output something like this:

    <div class="gallerynavigation">
     <ul>
      <li><a href="index.php?id=2&page=2">«</a></li>
      <li><a href="index.php?id=2&page=4">»</a></li>
      <li><a href="index.php?id=2&page=1">1</a></li>
      <li><a href="index.php?id=2&page=2">2</a></li>
      <li class="active"><a href="index.php?id=2&page=3">3</a></li>
      <li><a href="index.php?id=2&page=4">4</a></li>
      <li><a href="index.php?id=2&page=5">5</a></li>            
     </ul>
    </div>


    Site is still in development (prototype) but viewable here: http://thepalette.ca/index.php?id=2