Forums / Setup & design / Using toolbars inside other objects (solution)

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