温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

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

发布时间:2020-07-01 16:40:12 来源:网络 阅读:508 作者:firehare 栏目:web开发
  • 原文出处:4-enable_comments_on_a_page.md

  • 原文作者:FriendsOfSymfony

  • 授权许可:创作共用协议

  • 翻译人员:FireHare

  • 校对人员:

  • 适用版本:FOSCommentBundle 2.0.5

  • 文章状态:草译阶段

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:

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

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


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI