Opened 18 years ago
Closed 18 years ago
#2743 closed enhancement (fixed)
[patch] Extension of the {% cycle %} tag
Reported by: | Owned by: | Malcolm Tredinnick | |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The attached patch extendes named
cycle tags so that the current value of the cycle will be added to the context so that it is accessable in templates as a normal variable.
For example,
{% for obj in object_list %}
<tr class="{% cylce gb1,gb2 as background %}">
[....]
</tr>
{% if obj.need_second_row %}
<tr class="{{ background }}">
[....]
</tr>
{% endif %}
{% endfor }%
Attachments (1)
Change History (2)
by , 18 years ago
Attachment: | cycle.patch added |
---|
comment:1 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The patch for the tag enhancement and a new testcase for the new features