I have a problem where I need to increment a variable if it satisfies a conditional like so:
{matrix_tag_pair}
{if matrix_column_name}
$increment++
{/if}
{if $increment > 9}
do this...
{if:else}
do that...
{/if}
{/matrix_tag_pair}
Is it possible to do this without enabling PHP in a template? I don't see where you can create throwaway variables like counters using just EE template tags.
Solution: Increment was close enough that I modified the source so it could also return the count without incrementing.
{exp:pvl_increment start="0" step="1"}
{matrix_tag_pair}
{if matrix_column_name}
{exp:pvl_increment random}
{/if}
{if {exp:pvl_increment increment="no" random} > 9}
do this...
{if:else}
do that...
{/if}
{/matrix_tag_pair}
Thank you for pointing me in the right direction. This was enough that I didn't have to enable PHP in my template. This slightly modified version of Increment combined with Loop Plus could be a very useful combination.