Step 4: Enable comments on a page

The recommended way to include comments on a page is using the reference javascript provided. The javascript will asynchronously load the comments after the page load.


Note:The implementation javascript provided with FOSCommentBundle relies on jQuery 1.7 You will need to install this separately and make sure that it is available on the page you want to enable comments on.

注意:FOSCommentBundle提供的javascript实现是基于jQuery 1.7的。因此,您需要独立安装它,并确保它在您想启用评论的那个页面中是可用的。

You are welcome to rewrite the reference implementation using another javascript framework.


And the following code at a desired place in the template to load the comments:


{% include 'FOSCommentBundle:Thread:async.html.twig' with {'id': 'foo'} %}

That's the basic setup! For additional information and configuration check the ... section and the cookbook.

这是基础设置!更多信息和配置,请参阅 ... 章节和食谱

Any problem?


Check our FAQ.

请查阅我们的 FAQ