【发布时间】:2014-06-18 12:22:21
【问题描述】:
用twig向knp_menu's根元素<ul>添加类的正确方法是什么?
我尝试了很多东西:
1.
{{ knp_menu_render('main', {'class': 'foo'}) }}
2.
{{ knp_menu_render('main', {'attributes': {'class': 'foo'}}) }}
3.
{{ knp_menu_render('main', {'listAttributes': {'class': 'foo'}}) }}
4.
{{ knp_menu_render('main', {'attributes': {'listAttributes': {'class': 'foo'}}}) }}
他们都没有工作
【问题讨论】:
标签: php symfony twig knpmenubundle