We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18606
    • 25 Posts
    Hi,
    is it possible, after the ditto call, to show the numer of results?

    For example, I use ditto for display a list of cities. After that, I want to know haw many city are displayed..

    Paris
    London
    Madrid
    Rome

    There are 4 cities.


    Many thanks!
    Matteo
      • 16278
      • 928 Posts
      Ditto sets the [+total+] placeholder, but only when &paginate=`1`. That setting need not be a problem if you’re not actually paginating results, you just ignore other pagination features.
      Does that do what you need?
      smiley KP
        • 18606
        • 25 Posts
        I don’t know..
        The placeholder is used in chunk, so if I want to dislay the total results in a differnt place in the page, is it possible?

        I need this to insert the results in a javascript. In this a need the list of results (and this is not a problem), but also the number of that (in a "for" istance).

        for (var i = 0; i < [[here I need total]]; i++) {
        []
        Paris
        London
        Madrid
        Rome
        []
        }


        Is pagination and [+total+] good for me?