Skip to content
This repository was archived by the owner on Jun 20, 2018. It is now read-only.

Conversation

@vad
Copy link

@vad vad commented Jan 4, 2012

With {% ifswitch %} is not possibile to add other conditions, this is a nice complement that can be used if you need to do something like:

    {% if request|is_active:"switchname" and not user.is_anonymous %}
      <my>html</my>
    {% else %}
       <my>other html</my>
    {% endif %}

In this way you don't write <my>other html</my> twice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant