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

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 00:24:32
Script start
Timing: Jan 19 2025 00:24:32
Module start 'layout'
Timing: Jan 19 2025 00:24:32
Module start 'content'
Timing: Jan 19 2025 00:24:34
Module end 'content'
Timing: Jan 19 2025 00:24:34
Script end

Main resources:

Total runtime1.4680 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.0469152.6406
Module start 'layout' 0.00610.0058 740.687539.4922
Module start 'content' 0.01201.4544 780.1797547.1641
Module end 'content' 1.46630.0016 1,327.343812.1250
Script end 1.4679  1,339.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2408160.0002
Check MTime0.00140.0936160.0001
Mysql Total
Database connection0.00090.061010.0009
Mysqli_queries1.402495.5329570.0246
Looping result0.00090.0619550.0000
Template Total1.416196.520.7081
Template load0.00220.150320.0011
Template processing1.413996.318420.7070
Template load and register function0.00010.009310.0001
states
state_id_array0.00140.096210.0014
state_identifier_array0.00160.109520.0008
Override
Cache load0.00180.1255290.0001
Sytem overhead
Fetch class attribute can translate value0.00070.049320.0004
Fetch class attribute name0.00110.077250.0002
XML
Image XML parsing0.00240.161320.0012
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00910.6207240.0004
String conversion0.00000.001140.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs