add active class to link with sf2 and twig

前端 未结 10 910
故里飘歌
故里飘歌 2020-12-23 13:48

following simple code:

  • List
  • is there a simple way to add an cl

    10条回答
    •  悲&欢浪女
      2020-12-23 14:44

      Shortest version:

      {% set route = app.request.get('_route') %}
      
       
    • Sometimes useful:

      {% set route = app.request.get('_route') %}
      
      
    提交回复
    热议问题