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

add is_active stringfilter #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add is_active stringfilter #32

wants to merge 2 commits into from

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.

None yet

1 participant