doyrte8419 2012-07-07 14:13
浏览 6
已采纳

如何使用Symfony2制作页面的常量部分?

I'm making website using (and learning) Symfony2. In my code, I always have to make 2 queries and display their results in sidebar, just like that:

Groups (251)

PHP
JS
Java
C++
...

Users (1542)

user1
user2
userN
...

How to make it using Twig & Symfony2? I ask about where to place it. I thought about requesting it in template, but I don't know how to do it. Sorry for poor English.

  • 写回答

1条回答 默认 最新

  • douyan6871 2012-07-07 14:25
    关注

    Embedding controller seems like the best fit.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?