溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

FOSCommentBundle功能包:在頁面中啟用評論

發(fā)布時間:2020-07-01 16:40:12 來源:網(wǎng)絡(luò) 閱讀:516 作者:firehare 欄目:web開發(fā)
  • 原文出處:4-enable_comments_on_a_page.md

  • 原文作者:FriendsOfSymfony

  • 授權(quán)許可:創(chuàng)作共用協(xié)議

  • 翻譯人員:FireHare

  • 校對人員:

  • 適用版本:FOSCommentBundle 2.0.5

  • 文章狀態(tài):草譯階段

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實(shí)現(xiàn)是基于jQuery 1.7的。因此,您需要獨(dú)立安裝它,并確保它在您想啟用評論的那個頁面中是可用的。


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

歡迎您使用其它的javascript框架來覆寫該引用的實(shí)現(xiàn)。

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.

這是基礎(chǔ)設(shè)置!更多信息和配置,請參閱 ... 章節(jié)和食譜

Any problem?

還有問題?

Check our FAQ.

請查閱我們的 FAQ。


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI