6. Comments (Posts)


If you have added a page to the website, then you can configure the website in a way, that visitors can add comments to this page.

Configuration to do by admin user

First the admin user must configure the website in a way, that adding comments would be possible.

Go to URL [path-to-your-site]/admin/list-config
Select module: Page
Select type: viewEvent

* Switch comments adding option on

Click Edit on commentSwitch row (where uri is commentSwitch).
A separated browser window should open.
If the Config value is not on, then change it to be on and click Save changes.

* Choose roles, who can add comments

Go back to the browser tab, where there was configuration list for module Page and type viewEvent.
Click Edit on commentRoleAccess row (where uri is commentRoleAccess).
Change Config value to be for roles, which you wish it to be.
For example all roles: admin, authenticated, anonymous

* Change post template

Go to URL [path-to-your-site]/admin/list-config
Select module: Page
Select type: postTemplate

Click Edit on postItemView row (where uri is postItemView).
You can change the default template there, which determines, how comments will be displayed after visitors have added them.
There can be used some tokens in square brackets, which will be replaced with some particular data.
The possible tokens are:
The tokens are more or less self-explanatory, but you can also try out, what data they are representing.

Configuration to do by page creator

The creator of the web page, who wishes his/her web page to allow comments, should visit the web page and scroll down and click on a new available link "Manage posting access".

A new page with a form will open.
Write Posting introduction (e.g. "You can add your comments here:"), tick checkbox "Posting enabled" and tick "Post default status" to be Published, then click Save button.

Now the visitors should be able to add comments to this page.

Edit or delete posts (comments)

Owner (creator) of the page and authenticated creator of the comment can edit or delete the comment too, if they have access right to corresponding OwnPage module methods. Page module has comment editing and deleting methods too, which access rights can be assigned to any role.
Such editing can be done, when visiting the page (i.e. when using view method for the corresponding Page module entry). Post editing or deleting links should be visible then by the posts, which can be edited or deleted by the current authenticated user.
Unauthenticated anonymous visitors can not edit or delete their posts.

Previous: 5. Snippets
Pages, Snippets, Posts
1. Add a page
2. List, view, edit or delete Pages
3. Managing Pages by different roles
4. Managing own Pages, Snippets and Posts
5. Snippets
6. Comments (Posts)