Hello, i noticed some strange behavior in the set, when there include.
Simply example
tst.txt:
{% set NAME = "John" %}
{% extends "base.txt" %}
{% block content %}
{% include "tst_include.txt" %}
{% endblock %}
base.txt
from base.txt
---
{% include "tst_include.txt" %}
---
{% block content %}{% endblock %}
tst_include.txt
hello "{{ NAME }}"
result:
from base.txt
---
hello ""
---
hello ""
but if I start to be using the variable NAME to base.txt
base.txt:
from base.txt
{{ NAME }}
---
{% include "tst_include.txt" %}
---
{% block content %}{% endblock %}
result:
from base.txt
John
---
hello "John"
---
hello ""
and if i use NAME in tst.txt
tst.txt:
{% set NAME = "John" %}
{% extends "base.txt" %}
{% block content %}
{{ NAME }}
{% include "tst_include.txt" %}
{% endblock %}
result:
from base.txt
John
---
hello "John"
---
John
hello "John"
This is bug or feature ?
I use 2.2dev-20091027 and 2.2.1 release -- results are the same.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---