We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18907
    • 5 Posts
    I have ditto working almost exactly as I want. There is one small problem however, when I display the pages for the items, I want the numbers split by a bar (i.e. |). My ditto is written like so:

    [!Ditto? &parents=`4016` &display=`3` &sortBy=`id` &sortDir=`DESC` &tpl=`toxic_tip` &paginate=`1` &paginateAlwaysShowLinks=`0` &paginateSplitterCharacter=`|` !]

    However, I just get the list of links like "1 2 3..." instead of "1 | 2 | 3...". Any idea how I can get that to work?

    Thanks!
      • 26085
      • 494 Posts
      Quote from: McKenna at Sep 26, 2007, 06:43 AM

      I have ditto working almost exactly as I want. There is one small problem however, when I display the pages for the items, I want the numbers split by a bar (i.e. |). My ditto is written like so:

      [!Ditto? &parents=`4016` &display=`3` &sortBy=`id` &sortDir=`DESC` &tpl=`toxic_tip` &paginate=`1` &paginateAlwaysShowLinks=`0` &paginateSplitterCharacter=`|` !]

      However, I just get the list of links like "1 2 3..." instead of "1 | 2 | 3...". Any idea how I can get that to work?

      Thanks!

      I try to find samthing like this. And then just add small HACK to file
      ditto.class.inc.php. Line 1022

      		for ($x = 0; $x <= $totalpages -1; $x++) {
      			$inc = $x * $summarize;
      			$display = $x +1;
      			if ($inc != $start) {
      				$pages .= "| <a class=\"ditto_page\" href='".$this->buildURL("start=$inc")."'>$display</a> |";
      			} else {
      				$modx->setPlaceholder($dittoID."currentPage", $display);
      				$pages .= "| <span class=\"ditto_currentpage\">$display</span> |";
      			}
      		}
      


      You sould understend, that it just HACK.