duanne9313 2017-03-21 19:25
浏览 24

twig没有更新symfony

I'm trying to override the login template of sonata bundle (base_login.html.twig). I want to add some link to other page but the template is not updating at 100%. The first new link i added outside the if statement is visible, but the one in the statement isn't. It 's like all changes in the if statement are not taken.

here is the code :

<ul>

    <li><a href="{{ path('homepage') }}">Accueil</a></li>
    <li><a href="{{ path('homepage') }}">gg</a></li> //this new link is visible when i render my login page
    {% if is_granted('IS_AUTHENTICATED_FULLY') %}
        <li>Bonjour, {{ app.user }}</li>
        <li><a href="{{ path('adminn') }}">Espace administration</a></li>
        <li><a href="{{ path('homepage') }}">test</a></li>  //this link isn't visible
        <li><a href="{{ path('fos_user_security_logout') }}">Déconnexion</a></li>
    {% else %}
        <li><a href="{{ path('fos_user_registration_register') }}">Inscription</a></li>
        <li><a href="{{ path('fos_user_security_login') }}"><i class="fa fa-hand-o-right" aria-hidden="true"></i>
    Connexion</a></li>
    {% endif %}
        </ul>

I have set cache to false and still no change.. If someone have an idea, he/she is welcome !

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 请提供一个符合要求的网页链接。
    • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
    • ¥15 网络设备配置与管理这个该怎么弄
    • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
    • ¥20 西门子S7-Graph,S7-300,梯形图
    • ¥50 用易语言http 访问不了网页
    • ¥50 safari浏览器fetch提交数据后数据丢失问题
    • ¥15 matlab不知道怎么改,求解答!!
    • ¥15 永磁直线电机的电流环pi调不出来
    • ¥15 用stata实现聚类的代码