Comment Workflow - WeTeam/WeBlog GitHub Wiki
Comment Workflow
By default, WeBlog provides a comment workflow which enables email notification and publishing of comments. It also has an optional step which allows moderation of comments.
The "Submit" action is automatically called by WeBlog after a comment is saved. To enable moderation, simply change its "Next State" to "Awaiting Approval" instead of "Approved."
Notification Emails
WeBlog provides an ExtendedMailAction which allows the use of various NVelocity tokens within the To, From, Subject, and Message fields. The available objects in the NVelocity context are:
blog: The Blog Home item (BlogHomeItem
)
entry: The Entry which the comment applies to (EntryItem
)
entryCreatedBy: The User Profile of the user who created the entry (UserProfile
)
entryUpdatedBy: The User Profile of the user who last updated the entry (UserProfile
)
comment: The comment itself (CommentItem
)
To see the available fields on the above classes, browse the WeBlog source or utilize a decompiler such as ILSpy.
The default behavior of the !WeBlog workflow is to email the user who last updated the entry when a comment is added. It could also be used, for example, to email the commenting user when the comment is approved.