当我将FOSComment添加到模板时,如何修复它?

时间:2015-11-27 14:26:35

标签: javascript symfony foscommentbundle

  

在编译模板期间抛出了异常   (“您必须将FOSCommentBundle添加到assetic.bundle配置才能使用   中的{% javascripts %}标记   FOSCommentBundle:Thread:async.html.twig。“)in   “FOSCommentBundle:线程:async.html.twig”。

这是我的Config.yml flile

fos_comment:
    db_driver: orm
    class:
        model:
            comment: Esprit\CommentBundle\MyBundle\Entity\Comment
            thread: Esprit\CommentBundle\Entity\Thread  

assetic:
    bundles: [ FOSCommentBundle ]
    fos_comment_api:
        type: rest
        resource: "@FOSCommentBundle/Resources/config/routing.yml"
        prefix: /api    
        defaults: { _format: html } 

1 个答案:

答案 0 :(得分:0)

FOSCommentBundle 添加到config.html中的资产配置

assetic:
    bundles:        ["FOSCommentBundle"]