Forum
Comment app configuration
I have comment app installed, but the comment also appear on other pages.
My page template
<?php
perch_comments('subpages', [
'template' => 'comment.html',
'sort-order' => 'DESC',
]);
perch_comments_form('subpages', 'Destinations');
?>
Can you please give a more detailed description of the issue you're trying to solve?
When I add a comment on for example page 1, the comment also appear on page 2, using the same page template.
Are they all using the identifier
subpages
?Yes. Is there a way to do this dynamically. Like if you use the same page template, the rest of individual pages does not show the same comment like the blog.
Yes, you need to use something dynamic for the identifier. The page path would work.
Can you guide me on how to accomplish that? I have never done it on Comment App.Thanks
It does not work if it's in the same PATH url.
But if i change the path url of page3.html the comment is showing
Any ideas?
Ok, so use something else unique. It doesn't matter what it is.
Sorry, my explanation was wrong, it's the path url not order of the page. I would like to use the same path url for SEO purposes.
This does not work on multi level page. Any advice.
Can you show me the real values involved?
Level 2 page template
Level 3 page template
Is that what you meant?
I mean when you state
/destinations/level3/page3.html
- is that the actual path of your page or an example?If it's not the path, what is the path?
Yes, that is the right example path.
I found the problem. It does not like a path with "-" (hyphen), or a long single name (e.g. imaverylongpagename)
Any ideas?
Ok, so you’ll need to use something else. You should be able to use the page attributes functions to get the
pageID
- how about that?Sure, as long as it works. Do you have an example?
It's all working now. Thanks Drew!
By the way, The Blog comments is showing the page title instead of using identifier. Which helps a lot when you have hundreds of pages. Is it possible with the comment app?