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

eZ debug

Timing: Jan 18 2025 21:18:48
Script start
Timing: Jan 18 2025 21:18:48
Module start 'content'
Timing: Jan 18 2025 21:18:48
Module end 'content'
Timing: Jan 18 2025 21:18:48
Script end

Main resources:

Total runtime0.1656 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 587.8594180.8125
Module start 'content' 0.00590.0047 768.671994.0547
Module end 'content' 0.01070.1548 862.7266522.8750
Script end 0.1655  1,385.6016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00392.3618200.0002
Check MTime0.00171.0134200.0001
Mysql Total
Database connection0.00130.806510.0013
Mysqli_queries0.120072.51361410.0009
Looping result0.00130.78161390.0000
Template Total0.154593.310.1545
Template load0.00140.836010.0014
Template processing0.153192.475610.1531
Override
Cache load0.00110.646310.0011
Sytem overhead
Fetch class attribute can translate value0.00140.829410.0014
XML
Image XML parsing0.00030.186110.0003
General
dbfile0.00271.6402200.0001
String conversion0.00000.002930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs