We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28221
    • 18 Posts
    Hello,

    I have two problems with ditto (these problems still exists in ditto 1.1b2)
    1) I have folder News(with alias ’news’) which consist of news documents. I also hase friends url on and docs prefix ’.html’. On this page ditto is called with code below:

    <div>
    [!Ditto? &tpl=`ditto_news_page` &dateSource=`pub_date` &sortBy=`pub_date` &summarize=`5` &dateFormat=`%d.%m.%Y` &paginate=1 &id=`bignews`!]
    </div>
    <div id="pagination">
    Ñòð.: [+pages_bignews+]
    </div>  

    When i click on "more" link on the news it hase url "http://bla.com/news/57.html" and it’s good.
    The problem with pagination. When i click on the second page (in pagination) it has url "http://bla.com/news/news.html?start_bignews=5" but it must be something like a "http://bla.com/news?start_bignews=5" or so on.

    2) when i use &dateSource=`pub_date` it shows `createon` date in [+date+] tag. Or how i can tell ditto outputs published date instead of creation date? And if document hasn’t a published date then ditto should use creation date instead of published date.
      • 18397
      • 3,250 Posts
      @Kudo, I am testing on that same version. Very odd. Can you try re-installing?


      @spoof: I will check the URL generation routine. As for pub_date, certain MODx version’s only set pub_date when you set a date for the document to be published. Try the publishedon field if you are using 0.9.2.2.
        • 12652
        • 228 Posts
        Does paginate strictly work within articles/documents?

        I’m using Ditto to serve up a products from the categories below... say there were 5 categories each with 20 products, at each level I would like to call up all of the products below... thereby they can browse all or drill down to a more limited detail.

        So at the top level, that is a Ditto call that is returning 100 products, but I’d like to serve up pages of 10 products, so there would be page 1, 2, 3,... up to page 10.

        While there is little text, they will each feature a photo, so the load time could get immense serving them all up on one page, not to mention a very long page, even with two side-by-side.

        thanks
          | Identity Developments delivers SEO focused web design and web presence services
          - it&#39;s not about websites, it&#39;s about your identity. |
          • 18397
          • 3,250 Posts
          Ditto paginates results sets already. It does not work within articles and documents.
            • 12652
            • 228 Posts
            Okay, this might be what I’m looking for then, if I understand correctly.

            So if there are a 100 results, it could deliver them 10 per page... if that is true, how do I tell it the "10" results per page part of that equation?

            thanks
              | Identity Developments delivers SEO focused web design and web presence services
              - it&#39;s not about websites, it&#39;s about your identity. |
              • 18397
              • 3,250 Posts
              &summarize=`10` &paginate=`1`
                • 12652
                • 228 Posts
                That’s it exactly. Either I forgot or I don’t know what... but for some reason I was thinking the summarize was strictly limiting how many results would be returned.

                Hopefully one of these days, all the intricate details of all the snippets will fall into place!!

                cheers
                  | Identity Developments delivers SEO focused web design and web presence services
                  - it&#39;s not about websites, it&#39;s about your identity. |
                  • 16429
                  • 254 Posts
                  On a fresh 0.9.2.2 install it works.
                  On my 0.9.2.1 no :’(

                  I think I’m going to have hard time fixing this.

                  But I don’t understand, the old 1.1beta1 works. Maybe I’ll text difference the 2 revisions.
                    kudo
                    www.kudolink.com - webdesign (surprised?)

                    [img]http://www.kudolink.com/kudolinkcom.png[/img] [sup]proudly uses[/sup] [img]http://www.kudolink.com/modx.png[/img]
                    • 18397
                    • 3,250 Posts
                    Did you remove the <?php from the first line of the snippet?
                      • 16429
                      • 254 Posts
                      Yes.
                      It was the first thing I looked for.

                      I’ve done some reuploading and now it seems to work.

                      Tomorrow I’ll do further tests, but now I’ve to pray grin

                      Thank you Mark for now.
                        kudo
                        www.kudolink.com - webdesign (surprised?)

                        [img]http://www.kudolink.com/kudolinkcom.png[/img] [sup]proudly uses[/sup] [img]http://www.kudolink.com/modx.png[/img]