Forums / Setup & design / How to use dynamic contentstructure menu in own templates?

How to use dynamic contentstructure menu in own templates?

Author Message

B. Vollmer

Monday 26 January 2009 8:59:46 am

I switched to ezP 4 some days ago and I used the ezodcsm-extension in my old ezP 3 installation. Now I want use the included dynamic treemenu from the admin interface in my own siteaccess. I took the following code snippet from a admin template an switched the 'Dynamic' attribute to 'enabled' for my siteaccess. But the snippet doesn't work, the template didn't generated any output. The static menu is working when I set 'Dynamic' to disabled, but there are no (+) icons to expand the subfolders.

{if ezini('TreeMenu','Dynamic','contentstructuremenu.ini')|eq('enabled')}
    {include uri='design:contentstructuremenu/content_structure_menu_dynamic.tpl'}
{else}
    {include uri='design:contentstructuremenu/content_structure_menu.tpl'}
{/if}

Does anybody know how to fix this?

B. Vollmer

Monday 02 March 2009 3:10:25 am

I'm still interested in this topic.

Is there anybody out there who can help me?

Paul Forsyth

Monday 02 March 2009 3:52:37 am

It may be because the old extension was for eZ 3 and the code needs to updated for eZ4 and PHP5.

Have you looked into the logs to see if there are errors?

Paul

B. Vollmer

Monday 02 March 2009 8:44:38 am

The ezodcsm extension was published for an optimized AJAX supported contentstructure tree in eZ Publish 3. It is not supported anymore since eZ Publish 4 has an AJAX contentstructure tree already built in. So I didn't install the plugin.

I want to use the provided dynamic contentstructure menu from the eZ Publish admin siteaccess in my own custom siteaccess. This should be possible or am I wrong?

Paul Forsyth

Monday 02 March 2009 9:18:21 am

Yes, its perfectly possible.

Have you copied across all relevant templates into your own design? The templates reside within the admin design directory.

Paul

B. Vollmer

Thursday 05 March 2009 6:37:57 am

I made an override template for content_structure_menu_dynamic.tpl with the content of the the file from the admin siteaccess. Now I have an output for the dynamic menu, but it's still a static one without icons to expand the main tree folders dynamicly. I think something is missing to generate the AJAX tree menu. Do I need to include some extra JS-libraries in my main pagelayout?

eZ debug

Timing: Jan 18 2025 00:05:58
Script start
Timing: Jan 18 2025 00:05:58
Module start 'content'
Timing: Jan 18 2025 00:05:58
Module end 'content'
Timing: Jan 18 2025 00:05:59
Script end

Main resources:

Total runtime0.8055 sec
Peak memory usage4,096.0000 KB
Database Queries203

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 589.0859180.7969
Module start 'content' 0.00820.6238 769.8828505.0391
Module end 'content' 0.63190.1735 1,274.9219338.0625
Script end 0.8055  1,612.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.5374210.0002
Check MTime0.00160.2017210.0001
Mysql Total
Database connection0.00110.131110.0011
Mysqli_queries0.720189.39322030.0035
Looping result0.00290.36192010.0000
Template Total0.772595.920.3862
Template load0.00220.273820.0011
Template processing0.770295.618820.3851
Template load and register function0.00030.037410.0003
states
state_id_array0.00120.144910.0012
state_identifier_array0.00080.093920.0004
Override
Cache load0.00170.2162220.0001
Sytem overhead
Fetch class attribute can translate value0.00170.209930.0006
Fetch class attribute name0.00110.139060.0002
XML
Image XML parsing0.00050.061930.0002
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00800.9943210.0004
String conversion0.00000.001330.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/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
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs