Friday 29 December 2006 4:43:05 am
Hi all, I've a very strange problem. I have a foreach block, and inside it, I put two IF blocks to print out diferent content depending on various conditions. Well, the second IF block is never executed, as if it was never there. Any idea about this? Here is the problematic code:
{foreach $list_items as $index => $child}
<li {if eq($module_result.section_id,$child.object.section_id)}
class="selected"
{/if}
{if eq($index,4)}
class="last"
{/if} ><a href={$child.url_alias|ezurl}>{$child.name|wash()}</a></li>
{/foreach}
For any reason the second IF is always ignored. If I reverse the order it does the same thing, executes the first one (prints result if the condition is true) but the second gets ignored.
Any help would be appreciated. Thanks in advance!
--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205
|