Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Since the blog tutorial only shows the comment inside a blog and in the context of a repeatable page as well as the snippets on comment inside documentation, how could I have a single page of comment inside a single non repeatable page?
Hi,

By 'repeatable' and 'non-repeatable' pages, I take you mean 'clonable' and 'non-clonable' templates.

You are right, the documentation shows the comments being used only with a clonable template but we can use comments with a non-clonable template as well.

The comment form can be displayed using the same method as shown in the docs.

For displaying the list of submitted comments, slight changes need to be made to the code.
The original code (abbreviated here) in the docs to show the comments is as follows -
Code: Select all
<cms:if k_is_page >
    <cms:comments page_id=k_page_id limit='5' order='asc' paginate='1'>
        ...
        ...
        <cms:paginator />
       
    </cms:comments>
</cms:if>

For a non-clonable template, we need to remove the k_is_page check and the 'page_id' parameter to make the code as follows -
Code: Select all
<cms:comments limit='5' order='asc' paginate='1'>
     ...
     ...
     <cms:paginator />
       
</cms:comments>

Hope this helps.
many many thanks, I will put it to good use soon.
3 posts Page 1 of 1