LatestComments snippet allows to obtain comments from the global scope of your MODx-driven site. Comments are descendingly ordered by a creation date.
Solving this task with the means given by Jot itself is neither obvious nor easy. Several threads on MODx forum where posters banged their heads against the brick wall serve for an evidence.
How to use LatestComments
# 1) create new snippet 'LatestComments' and paste into it content of the attached latestcomments.txt file
# 2) call your snippet something as:
[[LatestComments? &count=`5` &customFields=`name,email` &tplComment=`comment-chunk`]]
# 3) please read more details on parameters/ placeholders in snippet's header
Simple fetching items from Jot’s table in a MODx database cannot solve the issue of latest comments. The fetched info should also be correlated with a status of documents that the comments are attached to – documents may be in different states: published, unpublished, deleted.
There is also another problem — very often designers want to have along with latest comments also brief info on documents that the comments belong to.
I have tried to solve in my snippet all these most common issues. The snippet initially has been posted to this thread on MODx forum.
Comment #1 on: 2010-11-07, 23:02
Comment #2 on: 2010-12-13, 23:41
Comment #3 on: 2011-06-17, 11:30
Comment #4 on: 2011-06-18, 11:36
Comment #5 on: 2013-02-13, 09:45
Comment #6 on: 2014-02-12, 14:10