Closed richplane closed 12 years ago
Rich, did you try to set the parse attribute to "inward" on surgeree tag? Could you test this, please?
Thanks for the response. I tried this. Changing first line to
{exp:channel:entries dynamic="no" parse="inward"}
makes no difference.
BTW I'm using EE v2.5.2, Structure v3.3.3 (and Structure Entries v1.2.8), and Surgeree 1.5.3.
No, no. Please try to add the parse parameter to the surgeree tag.
oh! That can go on the {exp:surgeree:modulo} tag too can it?
{exp:channel:entries dynamic="no"}
{if '{exp:surgeree:modulo numerator="{count}" denominator="2" parse="inward"}' == 1}<div class="section">{/if}
...
... makes no difference. Putting {count} in there fixes it again.
I made some tests, rich. You're right. Looks like eecms doesn't parse channel:entries variables inside plugin parameters. I don't know if this is a bug or a deliberated behavior.
For a similar situation, I had to use an embed.
Confirmed. Not much we can do about this one in the plugin itself.
OK - thanks for this. Just to highlight the workaround I mentioned above, this makes it work:
{exp:channel:entries dynamic="no"}<!--{count}-->
{if '{exp:surgeree:modulo numerator="{count}" denominator="2"}' == 1}<div class="section">{/if}
<h3>{title}</h3>
{if '{exp:surgeree:modulo numerator="{count}" denominator="2"}' == 0}</div>{/if}
{/exp:channel:entries}
Any other inclusion of the variable in the template does seem to make EE parse the variable into the plugin parameters.
Here's a funny one for you.
This useage, as per your example -
(a massively simplified version of a subtemplate I'm using)
produces:
Probably the latter since
will fix the problem.
Any idea why?
I've one hypothesis: EE doesn't spot the use of {count} in the surgeree tag, so doesn't bother running the code to replace {count} with the value. That's a wild stab in the dark. It's the sort of foible that we learn to love and/or lose hair over when using EE.
Can modulo be made to work here? Simple workaround to put {count} in an HTML comment, of course.