I tried researching my question and trying myself but couldn’t do it. I saw that I should be using Jot for some procedure but it just didn’t end up working.
So my question is....
- Instead of just showing articles in a list when using [Wayfinder? &startId=`27` &ignoreHidden=’FALSE’] how can I show the articles, listed by date from latest to earliest, with also a small amount of that article showing below it? Say around 100 characters.
-
MODX Staff
- 2,502 Posts
You should be using Ditto for this and then use the extender Summary parameter to do show the character based summary. Here is the documentation:
http://ditto.modxcms.com/extenders/summary.html.
Hope this helps,
Jay
PS: You would/should use Ditto instead of the Wayfinder as it was designed to list documents over document titles/menu headings.
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
-
☆ A M B ☆
- 24,524 Posts
Jot is for user comments. It is usually used in conjunction with Ditto to add commenting to blog posts. I’ve used it alone, though, as a guestbook type application.
Thanks I’ll check that out. However I’m looking at that page and it confuses me more. Do I use Ditto AND this code on the page, or just this code? If so how would it know that I want all the documents unless I’m calling them all?
For example "[+summary+] will contain the first "n"characters of the corresponding MODx document’s content field." How does it know which documents I want to show?
Also sorry I mean Ditto not Jot.
And one other question before I forget... I wanted to use Jot but it added a comments box to all my pages, I don’t want it on pages such as the index, 404, search page etc, how can I do that?
-
☆ A M B ☆
- 24,524 Posts
You give Ditto a parameter that tells it which folder(s) to start with as the parent(s), and it loops through all of that folder’s children, making summaries with links for each one.
You could have a different template for your individual blog post pages, with the Jot snippet there, either in a sidebar or under the [*content*] tags.
Or, you could use a TV and have it empty for all the other pages, and only give it a value for the blog folder. If you use @INHERIT as the TV’s default value, and only fill it with the Jot snippet tags in the folder page, then all its children (your individual blog posts) will have the form.