We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32645
    • 377 Posts
    My ditto code won’t display the paginateSplitterCharacter, even if I hack the ditto.class.inc.php to force the splitter to be a pipe ’|’

    [[Ditto? &startId=`[*id*]`  &pagesPerPage=`10`  &paginateAlwaysShowLinks=`1` &paginateSplitterCharacter=`|` &paginate=`1` &summarize=`3`]]
    


    Is there a reason why the splitterCharacter does not display, and how do I resolve it?

    Thanks.
      • 16278
      • 928 Posts
      Where are you expecting to see the character appear? It’s tempting to believe it will divide up the page numbers, but that ain’t what it does:
      &paginateSplitterCharacter
      Purpose: Character to split ’previous’ and ’next’ links when &paginateAlwaysShowLinks is off and both links are there
      Values: Character (or string)
      Default: `|`
      Notes: Prevents links showing as ’< Previous Next >’ when [+pages+] is not being used

      If you want to separate the links to each page, the parameters required are &tplPaginatePage and tplPaginateCurrentPage, e.g. this in your Ditto call
      &tplPaginatePage=`pageSplitter` &tplPaginateCurrentPage=`currentPageSplitter`
      and this as chunks called pageSplitter
      <a href='[+url+]'>[+page+]</a> | 
      and currentPageSplitter
      [+page+] | 


      Quite a rigmarole for what looks as if it should be so simple! I’m indebted to De Ribas over in the Russian forum, who explained this in a reply to someone else - previously, I had thought there was no parameter to set a character to display between the page numbers. (Note to self: must update relevant Pogwatch page Done),
      grin KP

        • 32645
        • 377 Posts
        Hi there. Thanks for your reply!

        I didn’t realise the paginateSplitterCharacter wasn’t the splitter between each item.

        Yes, you are correct that I am after an output similar to this:


        1 | 2 | 3 | 4 | 5 | ... etc...

        I will review your idea and if I have a problem, or resolved I will post it here.
          • 32645
          • 377 Posts
          Hi there

          Your solution worked great! Thanks!