We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32380
    • 137 Posts
    Hi There i am using ditto to creat a paginates list using the following call

    [!Ditto? &startID=`12` &summarize=`5` &total=`all` &tpl=`mainpage` &paginate=`1` &paginateAlwaysShowLinks=`1` &orderBy=`DESC`!]
    <br />
    <br />
    <div id="ditto_wrapper">Page <strong>[+current+]</strong> of <strong>[+total+]</strong> Articles
    <div id="ditto_pages">[+previous+] [+pages+] [+next+]</div>
    </div>

    But for some reason the [+current+] placeholder does not display a value. example :http://www.swiftltd.co.uk/news.html
    any ideas?

      • 32380
      • 137 Posts
      Anyone?
        • 7231
        • 4,205 Posts
        It should show. I just tested it and it did not show for me as well so there may be a bug.

        Maybe this will get more attention in the Ditto sub form (I will try to move).
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don&#39;t know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 4172
          • 5,888 Posts
          I can see no placeholder named [+current+], there is only one called [+currentPage+] :

          		} else {
          				$modx->setPlaceholder($dittoID."currentPage", $display);
          				$pages .= $this->template->replace(array('page'=>$display),$tplPaginateCurrentPage);
          			}
          		}
          		$modx->setPlaceholder($dittoID."next", $nextplaceholder);
          		$modx->setPlaceholder($dittoID."previous", $previousplaceholder);
          		$modx->setPlaceholder($dittoID."splitter", $split);
          		$modx->setPlaceholder($dittoID."start", $start +1);
          		$modx->setPlaceholder($dittoID."urlStart", $start);
          		$modx->setPlaceholder($dittoID."stop", $limiter);
          		$modx->setPlaceholder($dittoID."total", $total);
          		$modx->setPlaceholder($dittoID."pages", $pages);
          		$modx->setPlaceholder($dittoID."perPage", $summarize);
          		$modx->setPlaceholder($dittoID."totalPages", $totalpages);
          		$modx->setPlaceholder($dittoID."ditto_pagination_set", true);
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 7231
            • 4,205 Posts
            Well that would be a good reason for it not working. rolleyes

            wiggy: where did you see this? I found it in the wiki Ditto Placeholders. I think that list is prior to Ditto 2.x.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don&#39;t know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 32380
              • 137 Posts
              Thanks very much it now working!!!
                • 32380
                • 137 Posts
                Just a note, might be worth changing the Wiki entry as this is where i got the incorrect info?
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Yes it would be worth correcting any bad entries on the wiki ... please do so!
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me