We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33431
    • 29 Posts
    Hello I would like to have ditto set up to display front page news articles in a blog fashion, but without comments, would like everything cached, but have left uncached for now, in an attempt to get things working

    To try and get pagination happening I did this
    [!Ditto? &id=`1` &tpl=`bitto` &parents=`10` &dateSource=`myDate` &sortBy=`myDate` `%d.%m.%y` &phx=`0` &paginateAlwaysShowLinks=`1` &paginate=`100`!]

    and added this to the rest of the ditto chunk info &tpl=`bitto` chunk
    <p>Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles | Page <strong>[+currentPage+]</strong> of <strong>[+totalPages+]</strong> </p> <div id="ditto_pages"> [+previous+] [+pages+] [+next+] </div>

    Unfortunately no pagination happened
    all I go was this "Showing - of Articles | Page of " showing under each news post which I don’t want and don’t know why it happened

    I also tried making the split pagination as
    quote ’by Mark (visit author’s site)
    Generates split pagination for Ditto
    Works with MODx Version(s): 0.9.5’
    I tried marks method, maybe incoreectly?
    by pasting the snippet ’// Snippet: splitPagination’ and all its code into a snippet. The calling the snippet [!Pagin? &resultsPerPage=`3`!]
    and putting it straight under the [!Ditto?!] as I assumed thats what the instructions meant. But I assume I understood the instrcutions wrong. As no pagination happened

    Now onto ditto question 2:

    I would like to know how people get summaries of their articles on the page showing ditto, like the first 50 words or so, like a blog would do, as I only get the links to the articles showing with no summerization of my articles, I just get a list of links? although my ditto chunk has [+introtext+] I copy and pasted the chunk from the ditto documentation section of modx

    Ditto makes me feel like this huh shocked huh

    Thankyou from Josh
      • 7231
      • 4,205 Posts
      1) the pagination placeholders need to be in the document together with the Ditto call. Not sure if they will work in the ditto TPL (if so they would repeat after each iteration).

      2) Ditto has a truncate and summary functions that will extract the intro from the content. I think you need to include the summary extender in your call.
        [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]
        • 36592
        • 970 Posts
        Quote from: dev_cw at Nov 26, 2008, 04:30 AM

        1) the pagination placeholders need to be in the document together with the Ditto call.
        And you have to add id prefix in your pagination placeholders.
        When you set &id=`1` in your Ditto call, the placeholders would be [+1_start+], [+1_stop+] and so on.
          • 33431
          • 29 Posts
          Hi  dev_cw and tkfm Thankyou very much for your help  smiley


          Thanks from Josh
            • 33431
            • 29 Posts
            Ok I have found out why my pagination wasn’t working

            I had &paginate=`100` thinking the number was to do with how many pages would be shown at the bottom of the page

            I changed it to &paginate=`1` and pagination worked cool

            Along with what tkfm said, quote: ’When you set &id=`1` in your Ditto call, the placeholders would be [+1_start+], [+1_stop+] and so on’

            Great!

            Would anyone know what settings to have maximum caching of ditto while still having pagination?

            Cheers people