We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16639
    • 26 Posts
    Hello! I’m using modx 0.9.6. and Ditto 2.0.2.

    How can I create links in the pagination to the first and last pages? So that the link to the first page won’t be shown, if I’m
    on the first page, and the link to the last page won’t be shown, if I’m on the last page?

    Thanks for your support.

    Boris
      • 33982 ☆ A M B ☆
      • 476 Posts

      How can I create links in the pagination to the first and last pages? So that the link to the first page won’t be shown, if I’m
      on the first page, and the link to the last page won’t be shown, if I’m on the last page?
      So you’re trying to get the pagination to not output the current page that you’re on?

      Well, for starters, here’s a typical example of pagination in your Template:
      <div id="ditto_pages">
      [+previous+] [+pages+] [+next+]
      </div>
      

      All I would do is use some CSS to not display the current link. If you look at the output HTML when using pagination, you’ll see for the link of the current page (in this case page 1):
      <span class="ditto_currentpage">1</span>
      

      In your CSS, just have .ditto_currentpage {display:none;}
        Precision Web Development ... SmashStack.com