Hey all,

Tim Graham suggested I posted to this list regarding an idea for a new 
feature: conditional block tags.

I've summarized the feature in this 
ticket: https://code.djangoproject.com/ticket/24232

The basic idea is to be able to write something like this in a template:

{% block myblock if myvariable %}my content{% endblock %}

If the condition is false it is as if the block wasn't there, meaning its 
parent would be rendered instead, if it exists.

This is really a short form of:

{% if myvariable %}
  my content
{% else %}
  {{ block.super }}
{% endif %}

Note that it may seem similar to ticket #9173 but they are different, which 
I try to make clear in this 
comment: https://code.djangoproject.com/ticket/24232#comment:2

So, what do you think?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/9ce259ff-6a2e-493a-a6df-1c15b43fe9c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to