Adding Comments To Your Site

This section tells you how to add a comments to your web site. In this example we will add comments to calendar events. This firstly requires that you create a comment group using the Calendar Events type.

Additionally, you must have a page that displays a calendar event. This must be a page that uses the Calendar Event Details page type driver. We will be added the comments to this page.

Note

Refer to the Managing Pages chapter for details on managing pages and page types.

Create Templates

The first step is to create templates. There are two templates required: a form template for submitting a comment, and a template to list out comments on the page.

Note

For more details about creating and managing templates, refer to Managing Templates.

To create the form template, create a new template using the Comment Submit type. You can use the sample template available to create the form.

Tip

If you want to send emails when the user submits a comment (either to an administrator or a confirmation message for the user), you will need to create templates for these emails too. The template type to use is the Comment Submit - Email.

Next, create a template for listing comments. Use the Comments Listing template type (under the Container Rule heading).

Add Comments to Your Site

The next step is to add a comments submission form to your site. Before you can do this you must create the form in the Control Panel. For details about creating forms refer to the Managing Forms chapter. The type of form to create is Comment Submit.

When creating the form you must select which comment group the form is connected to. Therefore, if you have multiple comment groups, you will need a separate form for each group.

Once you have created the form, add it to the calendar event details page using the Web Form container rule. For more details about managing container rules, refer to Administration Mode. Use the form template you created in the previous step.

To display comments on your site, add the Comments Listing container rule to the calendar event details page. Use the template you created in earlier step for displaying the comments.

Note

It's possible that a single event could have many comments linked to it. Because of this, you should split up comments into multiple pages. The comments listing container rule provides options for achieving this.