Wednesday 22 September 2004 11:03:30 am - 5 replies
Hello,
I am trying to use the ddelimiter tag in the following code, but it isn't working. I think because it is inside a second section tag.
{section name=folder loop=fetch('content','list',hash(parent_node_id, 87, "sort_by", array("name", true())))}
{section show=$folder:item.node_id|ne(58)}
<div class="menuItem">
<a href={concat("/content/view/full/", $folder:item.node_id, "/")|ezroot}>{$folder:item.name|wash}</a>
</div>
{delimiter}
<div class="menuDivider">
</div>
{/delimiter}
{/section}
{/section}
If I move the delimiter outside the inner section tag then it works but I get two dividers where the omitted item would have been.
Any ideas anyone?
Regards,
Ed.
Modified on Wednesday 22 September 2004 11:05:18 am by Edward Eliot
Wednesday 22 September 2004 2:17:53 pm
Hi,
Could you try to move inner section tag inside delimiter tag? Example in your case:
{section name=folder loop=fetch('content','list',hash(parent_node_id, 87, "sort_by", array("name", true())))}
{delimiter}
{section show=$folder:item.node_id|ne(58)}
<div class="menuItem">
<a href={concat("/content/view/full/", $folder:item.node_id, "/")|ezroot}>{$folder:item.name|wash}</a>
</div>
<div class="menuDivider">
</div>
{/section}
{/delimiter}
{/section}
or not use delimiter tag at all
{section name=folder loop=fetch('content','list',hash(parent_node_id, 87, "sort_by", array("name", true())))}
{section show=$folder:item.node_id|ne(58)}
<div class="menuItem">
<a href={concat("/content/view/full/", $folder:item.node_id, "/")|ezroot}>{$folder:item.name|wash}</a>
</div>
<div class="menuDivider">
</div>
{/section}
{/section}
Regards,
wenyue
Wednesday 22 September 2004 2:59:41 pm
Thanks for your feedback, but I am not sure these suggestions would help with my problem. If I move all the code inside that wouldn't work because only the
<div class="menuDivider"> </div>
part forms the divider. If I miss it out altogether then I have one too many divders. I don't want a divider on the last item.
eZ or anyone else, any ideas?
Modified on Wednesday 22 September 2004 3:00:27 pm by Edward Eliot
Wednesday 22 September 2004 3:32:18 pm
Ed, out of curiosity, what is the purpose of <i>menuDivider</i>? Is it purely a way to provide a division between menus? I know that seems like a stupid question, but I have a reason for it.
If that is the purpose, is there any reason you can't drop it altogether and apply the appropriate style(s) to <i>menuItem</i>? It would cut down on extraneous markup as well as solve this problem if you could drop the separate delimiter.
Wednesday 22 September 2004 4:17:44 pm
Also, the following doesn't seem to work:
{section name=folder loop=fetch('content','list',hash(parent_node_id, 58, "sort_by", array("name", true())))}
<div {delimiter}class="menuItem"{/delimiter}><a href={concat("/content/view/full/", $folder:item.node_id, "/")|ezroot}>{$folder:item.name|wash}</a></div>
{/section}
the class="menuItem" appears outside the DIV in the rendered code.
You must be logged in to post messages in this topic!