Using toolbars inside other objects (solution)

Author Message

Stuart Fenton

Monday 16 August 2004 8:42:02 am

For those of you trying to put the toolbar inside another object as I have been trying to do you need to alter the "node_list.tpl" template to remove the reference to $requested_uri_string and replace it with $node.path_identification_string instead. There are a few other templates which use the same variable and it works with them as well.

{cache-block keys=$tool_id}
	{default limit=5}
		{section show=or($show_subtree|count_chars()|eq(0), $node.path_identification_string|begins_with( $show_subtree ))}
	
			{section show=$sort_by|count|eq( 0 )}
				{set sort_by='published'}
			{/section}
	
			{let node_list=cond( $treelist_check|eq( 'yes' ),
			                         fetch( content, tree, hash( parent_node_id, $parent_node,
			                                limit, $limit,
			                                class_filter_type, exclude,
			                                class_filter_array, array( 'folder' ),
								            sort_by, array( $sort_by, false() ) ) ),
			                     fetch( content, list, hash( parent_node_id, $parent_node,
			                            limit, $limit,
			                            class_filter_type, exclude,
			                            class_filter_array, array( 'folder' ),
							            sort_by, array( $sort_by, false() ) ) ) )}
			<div class="toollist">
			    <div class="toollist-design">
				    <h2>{$title}</h2>
				    <div class="content-view-children">
					    {section name=Node loop=$node_list sequence=array(bglight,bgdark)}
					        {node_view_gui view=listitem content_node=$Node:item}
					    {/section}
				    </div>
			    </div>
			</div>
			
			{/let}
		{/section}
	{/default}
{/cache-block}

$requested_uri_string is only available in the top level namespace.

Hope this helps anyone with problems using the toolbars outside of the pagelayout.tpl templates.

Regards
Fats

--
Fats Neutron
fats.neutron@grandmore.com
http://www.grandmore.com

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

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 19 2025 03:28:45
Script start
Timing: Jan 19 2025 03:28:45
Module start 'layout'
Timing: Jan 19 2025 03:28:45
Module start 'content'
Timing: Jan 19 2025 03:28:46
Module end 'content'
Timing: Jan 19 2025 03:28:46
Script end

Main resources:

Total runtime0.9567 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 589.2891152.6406
Module start 'layout' 0.00500.0028 741.929739.4766
Module start 'content' 0.00780.9478 781.4063472.5859
Module end 'content' 0.95560.0012 1,253.99228.1250
Script end 0.9567  1,262.1172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3324160.0002
Check MTime0.00130.1363160.0001
Mysql Total
Database connection0.00060.061210.0006
Mysqli_queries0.915995.7340460.0199
Looping result0.00040.0376440.0000
Template Total0.925596.720.4627
Template load0.00250.258320.0012
Template processing0.922996.467520.4615
Template load and register function0.00010.012510.0001
states
state_id_array0.00080.086110.0008
state_identifier_array0.00140.141320.0007
Override
Cache load0.00190.1989140.0001
Sytem overhead
Fetch class attribute can translate value0.00070.078210.0007
Fetch class attribute name0.00050.054920.0003
XML
Image XML parsing0.00270.277810.0027
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00290.3050160.0002
String conversion0.00000.000740.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs