Is there a way to dynamically change the block name that is called (or do
something equivalent from the base class). Take the following example:
Test.txt
{% extends "base.txt" %}
{% block test1 %}
block 1
{% endblock %}
{% block test2 %}
block 2
{% endblock %}
{% block test3 %}
block 3
{% endblock %}
Base.txt
{% for a in ('1','2','3') %}
{% block test{{a}} %}{% endblock %}
{% endfor %}
I have a case where I want to override certian items that are rendered in
the base deck, but leave other items untouched. They are all rendered in
the same loop. I need a way to identify which items I am overriding. The
most clean way in my mind is to have dynamic block names, but it is not
clear how to construct a name that can change each time through the loop.
~ LL
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.