We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15200
    • 56 Posts
    Hi all

    I’m creating a website for a school which will have multiple blogs (one for each class, the school in general and its 2 departments).

    On each page/post I would like to display an overview of the recent posts in the selected category + an overview of the recent posts of all blogs.

    I succeeded in displaying both, but when I turn pagination on for both, when you click next in one overview, both overviews jump to their next page, because both "next-buttons" use the same link...

    Any ideas?

    Grtz and thanks in advance wink
      • 36416
      • 589 Posts
      Quote from: K?! at Mar 17, 2010, 05:33 AM

      I succeeded in displaying both, but when I turn pagination on for both, when you click next in one overview, both overviews jump to their next page, because both "next-buttons" use the same link...
      Any ideas?

      Take a look at the Ditto id parameter:
      http://ditto.modxcms.com/files/snippet-ditto-php.html#id
        • 15200
        • 56 Posts
        Ok, i will tomorrow at work.
        Thanks mate.
          • 15200
          • 56 Posts
          Ok, I’ve read it

          Here’s my case: I’m on a project (my first one, I’m on an internship), and I started with barely any planning.
          The two ditto calls I spoke of are already deleted (I need to make them again because I’m reorganizing the site).

          I need to work on other things today, so I’ve got no time to test it, but I suppose that when I give the Ditto call an ID, it’s links (next etc.) will be different and my problem will be solved.
          Since the article reads:
          Unique ID for this Ditto instance for connection with other scripts (like Reflect) and unique URL parameters

          I don’t wan’t to be asking everything and trying nothing myself, but if anyone know that this won’t work, please let me know.


          Thanks again Eol wink

          Grretings
            • 15200
            • 56 Posts
            Ok, I’ve been messing around with this ID parameter, but from the moment I add it pagination disappears...

            Any thoughts?

            Grtz
              • 16278
              • 928 Posts
              Once you have an id on your Ditto call, you have to prefix the relevant placeholders on that page with it, plus an underscore:
              [!Ditto?id=`year6` .... !]
                  ....
              [+year6_next+] etc.
              

              ;) KP
                • 15200
                • 56 Posts
                Eureka! Hehe, thanks m8 wink

                Now I’ve seen one more problem, but maybe this should be posted in a different topic.
                I’m going to ask it here anyways, I’ll make a new one if answers don’t come.

                These ditto overviews are on the bottom of my page. When I click for a new page in the Ditto overview, the page is displayed from the top again, so the user has to scroll down again to see the ditto overview of blog posts.

                Any solutions to this?
                On thing I thought of is like in html, when you add #id_of_an_html_element to a link, it displays this element at the top. I don’t know if it is possible to add something like that in the links that Ditto uses? Or if there is an other solution.

                Grtz