Forum macro

Release 1.1 - ...

The Forum smartlet allows you to integrate a discussion forum in your site.

A Forum is simply a folder within your site that renders the Forum smartlet. Topics will be added as items within the folder. Topic items are rendered by the Forum Topic Render Template, which redirects to the parent folder with a query parameter stating the specific topic to be rendered. This way you can link to topics directly, e.g. from a search page.

Example

The image below shows an example of a Forum.

Forum example

When rendering the folder item containing the different topics, you can use the Forum smarlet to display a topic overview.

Forum - Topic list example

The Add new topic, Edit topic and Toggle moderation mode options are only available to users with sufficient access rights.

Parameters

The table below gives an overview of the available parameters for the Forum Smartlet.

Name Type Default Description
newCommentStatus string WAITINGFORAPPROVAL Status code to be applied to new forum posts.
allowNested boolean true Determines if users can reply to other posts.
clipHierarchy integer 12 To avoid messy lay-out the indentation of replies can be clipped at a given level. Users can still reply, but the comment will not be indented further than its parent.
pageSize integer 10 The number of forum topics that will be displayed on a page. Set to zero (0) to disable paging in the topic list.

ContentAccess

The following access type levels apply to the Forum smartlet. Access only needs to be applied to the smartlet item itself. If your site requires different sets of rights for different parts of the site, copy the Forum folder and apply different Content Access to the copy.

Access Type Level Description
ForumPost Users can create posts, but the "newCommentStatus" will be applied to their posts.
ForumPostActive Users can create forum topics and posts that are activated immediately.
ForumModerate Users can post, approve and disapprove posts and add or edit topics.
ForumAdminister Users can post, moderate, edit and delete posts and add or edit topics.

Technical details

The Forum Smartlet does not have a specific SXML macro counterpart, however it re-uses several vipermethods from the ItemComments viper class as well as that it partly uses the ItemComments SXML macro.

Comments added to a specific forum topic are stored within the table swtIemComments.