We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15215
    • 6 Posts
    I apologise if this topic has been shown before but I had a really good look around before posting.

    I know ditto can do this but i don’t want to use it because I’m pressed for time and I know the basics of wayfinder. (I’ll look into ditto when I have time)

    Can someone please tell me how to have the wayfinder display the last 5 or whichever number posts by order of date published.

    I don’t want it to display more than the amount specified.

    Thanks.
      • 15215
      • 6 Posts
      I might have put this into the wrong category, sorry if I did.
        • 3749
        • 24,544 Posts
        Wayfinder is primarily a navigation snippet for creating menus. It sounds like you really want Ditto (in which case your message is in the wrong place, but not by much). This should get you started:

        [~Ditto? &parents=`12` &total=`5`~]

        Change 12 to the id of the parent document of the pages you want to show.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 15215
          • 6 Posts
          Does ditto need any configuring? I’m assuming it’s already installed with modx?

          Thanks, I’ll try that.

            • 15215
            • 6 Posts
            Thanks that worked!

            The only problem now is that I use justified text on the page and now the links are all spread out and justified as well as the text. Is there any easy way of changing this? I have the css applied to the div that the ditto tag is in. Also in the same div is an image and a small amount of text.
              • 3749
              • 24,544 Posts
              Quote from: kaboodle at Mar 03, 2010, 02:34 PM

              Thanks that worked!

              The only problem now is that I use justified text on the page and now the links are all spread out and justified as well as the text. Is there any easy way of changing this? I have the css applied to the div that the ditto tag is in. Also in the same div is an image and a small amount of text.

              Look at the page source. I think the Ditto section will have its own div that you can style as you like. If not, you can create one or more Tpl chunks for Ditto to use that creates the divs.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 15215
                • 6 Posts
                Thanks,

                I just realised that I also want it to display the description from the page it’s going to link to. I can do this in wayfinder like this:

                [!Wayfinder? &startId=`3` &limit=`3` &sortBy=`createdon` &level=`1` &outerTpl=`menu-outer` &rowTpl=`menu-row`]]

                I also have the description placeholder in the outer or row chunk (can’t remember which one)

                but it doesn’t show the date and the person who posted it like ditto does.


                So basically I want to know how to make ditto display a description under the link.

                Thanks,

                Dan
                  • 3749
                  • 24,544 Posts
                  I think everything you want to know is here:

                  http://ditto.modxcms.com/tutorials/creating-a-custom-template.html
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 15215
                    • 6 Posts
                    How do I remove the author and date from being added in ditto?

                    by Hugh Crawford on 03-Mar-10 03:26 This is a problem because the name of the person is not the person who wrote all the articles.
                      • 3749
                      • 24,544 Posts
                      It should be in your &tpl chunk.
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting