search

Home  >  Q&A  >  body text

symfony - javascript tags in sf2

An exception has been thrown during the compilation of a template ("You must add SiteHomeBundle to the assetic.bundle config to use the {% javascripts %} tag in SiteHomeBundle::layout.html.twig.") in "SiteHomeBundle::layout.html.twig".

求解……

世界只因有你世界只因有你2751 days ago369

reply all(1)I'll reply

  • 滿天的星座

    滿天的星座2017-05-16 16:46:53

    /app/config/config.yml There is an asset configuration section

    assetic:
        # ...其他配置
        bundles: []
    

    You can comment out the bundles line, or add your bundle:

    #bundles: []
    #或
    bundles: [SiteHomeBundle]
    

    reply
    0
  • Cancelreply