FOSCommentBundle功能包:在页面中启用评论

简介:

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.

在页面中包含评论的推荐方式是使用javascript提供的引用。javascript将在页面加载后异步加载评论。

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.

欢迎您使用其它的javascript框架来覆写该引用的实现。

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

在模板需要的地方添加下列代码将加载评论:

1
{%  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




本文转自 firehare 51CTO博客,原文链接:http://blog.51cto.com/firehare/1257655,如需转载请自行联系原作者
相关文章
|
4月前
|
小程序
laravel8(二)配置自定义路由文件
关于laravel5添加自定义路由文件,请移步《laravel5.8(十五)新增自定义路由文件》 这里大概记录一下laravel8添加自定义路由文件的过程: 持续创作,加速成长!这是我参与「掘金日新计划 · 10 月更文挑战」的第11天,点击查看活动详情 1:首先在routes目录下创建你要添加的自定义路由文件 我这里直接复制的web.php。 2:修改app/Providers目录下RouteServiceProvider.php文件 我这里也是直接复制web部分的代码改的名字 3:修改app/Http目录下Kernel.php文件 我这里还是直接复制web部分的代码改的名
32 1
SAP Spartacus应用启用时导入的一些模块
SAP Spartacus应用启用时导入的一些模块
SAP Spartacus应用启用时导入的一些模块