﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
13567	cycle tag with 'as' shouldn't return a value	Paul Garner	Łukasz Rekucki	"if you use the 'as' form of the cycle tag, eg:
{{{
    {% cycle 'odd' 'even' as row_class %}
}}}
...that cycle tag still outputs a string at that point in the template.
Usually tags which set a context variable don't return a value - if you want to output the value you can do that separately with {{ row_class }}

It's unhelpful in the following use case:
{{{
    <table>
    {% for item in outer_loop %}
        {% cycle 'even' 'odd' as row_class %}
        {% for row in inner_loop %}
            <tr class=""{{ row_class }}"">
        {% endfor %}
    {% endfor %}
    </table>
}}}
i.e. you want to cycle values based on the outer loop, but they have to be output from within the inner loop. AFAIK you can't use the cycle tag within the inner loop as it'll pick up the wrong loop.

The code above works, but you also get 'odd even odd even odd even odd even...' appearing above the table, with no way to avoid it.

I think if you use the 'as' form it shouldn't output a value. Patch attached.
"		closed	Template system	dev		fixed		ego@… Łukasz Rekucki	Accepted	1	0	0	0	0	0
