Twig 细枝否定以
细枝模板中以开头的Twig 细枝否定以,twig,Twig,细枝模板中以开头的的否定是什么 如果我的url以“account”开头,我不想显示登录按钮 在我的情况下,开始的唠叨是什么 {% if req starts with 'account' %} <a href="/account">login</a> {% endif %} {%if req以“account”%”开头 {%endif%} 您可以使用not来否定表达式。为了使用startfithsu需要强制twig首先使用parantises执行表达式 {%如果不是(请
的否定是什么
如果我的url以“account”开头,我不想显示登录按钮
在我的情况下,开始的唠叨是什么
{% if req starts with 'account' %}
<a href="/account">login</a>
{% endif %}
{%if req以“account”%”开头
{%endif%}
您可以使用not
来否定表达式。为了使用startfiths
u需要强制twig
首先使用parantises执行表达式
{%如果不是(请求以“account”开头)%%
{%endif%}