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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:40:43
Script start
Timing: Jan 18 2025 22:40:43
Module start 'layout'
Timing: Jan 18 2025 22:40:43
Module start 'content'
Timing: Jan 18 2025 22:40:43
Module end 'content'
Timing: Jan 18 2025 22:40:43
Script end

Main resources:

Total runtime0.5910 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 595.1172152.6250
Module start 'layout' 0.00470.0024 747.742239.4453
Module start 'content' 0.00700.5825 787.1875603.2109
Module end 'content' 0.58960.0014 1,390.398416.1641
Script end 0.5909  1,406.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.4907160.0002
Check MTime0.00130.2129160.0001
Mysql Total
Database connection0.00070.113610.0007
Mysqli_queries0.537390.9143680.0079
Looping result0.00070.1122660.0000
Template Total0.563595.320.2817
Template load0.00190.329120.0010
Template processing0.561595.016420.2808
Template load and register function0.00020.032410.0002
states
state_id_array0.00060.107810.0006
state_identifier_array0.00100.177520.0005
Override
Cache load0.00170.2822330.0001
Sytem overhead
Fetch class attribute can translate value0.00050.092530.0002
Fetch class attribute name0.00110.191370.0002
XML
Image XML parsing0.00060.098530.0002
class_abstraction
Instantiating content class attribute0.00000.001970.0000
General
dbfile0.00070.1116160.0000
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs