Forums / General / Problems with delimiter tag

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Problems with delimiter tag

Author Message

Edward Eliot

Wednesday 22 September 2004 2:03:30 am

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.

Wenyue Yu

Wednesday 22 September 2004 5:17:53 am

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

Edward Eliot

Wednesday 22 September 2004 5:59:41 am

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?

Alex Jones

Wednesday 22 September 2004 6:32:18 am

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.

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Edward Eliot

Wednesday 22 September 2004 7:02:12 am

Yes, that is the purpose. I agree with you, it probably is unnecessary, however I will still have the same problem with having to distinguish between the last menu item and the rest.

Edward Eliot

Wednesday 22 September 2004 7:17:44 am

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.