Forums / Setup & design / Put Basket toolbar in one specific subtree - Help

Put Basket toolbar in one specific subtree - Help

Author Message

Chris Lan

Friday 11 November 2005 10:57:39 pm

Hi,

I tried to include the basket toolbar in a specific subtree. I included the below code under <div class="toolbar-item {$placement}"> inside design/standard/templates/toolbar/full/basket.tpl.

It works but the issue is that all others toolbar are moved to left side and I don't understand why.

Help Help !!!!! Thanks Chris

{section show=or($show_subtree|count_chars()|eq(0),
fetch(content, node, hash( node_id, $module_result.node_id ) ).path_string|contains( concat( '/', $show_subtree, '/' ) ),
$requested_uri_string|begins_with( $show_subtree ))}
{let parent_node=fetch( content, node, hash( node_id, $placement_node ) )}

Ɓukasz Serwatka

Friday 18 November 2005 12:35:01 am

That should should do the trick.

{def $current_node=fetch( content, node, hash( node_id, $module_result.node_id ) )}

{if $current_node.path_array|contains(SUBTREE_START_NODE_ID)}
    {include uri='design:toolbar/full/basket.tpl'}
{/if}

Replace SUBTREE_START_NODE_ID with node_id of object since subtree start.

You can also pass additional parameter for include like "parameter=left|right" and set alignment in CSS.

{include uri='design:toolbar/full/basket.tpl' placement=left}

 

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Chris Lan

Friday 18 November 2005 5:12:52 am

Hi Lukasz,

Thank you very much. It works!!! I found also why it was doing that. I forgot to close the section. I am a bad beginner but I love your soft!!!

May I abuse and ask your help for this topic?
http://ez.no/community/forum/setup_design/help_unique_product
I believe that it should help more than one person and I have no clue after one week looking for the solution.

Thanks a lot again for your great soft.

Chris