Surge-ee / SurgerEE

A collection of simple tags for expressionengine that make template development easier.
Mozilla Public License 2.0
37 stars 8 forks source link

No content output when i leave ee var {count} #5

Closed petergeller closed 12 years ago

petergeller commented 12 years ago

Hi there,

i don't know if it's a bug, but if i don't use the var {count} to switch between odd and even entries, i get no results.

{exp:channel:entries channel="projects" status="open" dynamic="off"}

{if '{exp:surgeree:modulo numerator="{count}" denominator="2"}' != 0}

Simple output

{/if} {/exp:channel:entries}

EpocSquadron commented 12 years ago

If i'm understanding you correctly, this is not a bug. Surgeree:modulo needs to be manually passed the current count of the loop in order to function. Having it detect where in the loop it is would require extending Surgeree into an extension, which defeats the spirit of the plugin, which is really to provide the simple, but commonly needed methods that pop up.