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?

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 30 2025 00:45:13
Script start
Timing: Jan 30 2025 00:45:13
Module start 'layout'
Timing: Jan 30 2025 00:45:13
Module start 'content'
Timing: Jan 30 2025 00:45:13
Module end 'content'
Timing: Jan 30 2025 00:45:13
Script end

Main resources:

Total runtime0.0164 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.3906151.2422
Module start 'layout' 0.00490.0033 739.632836.7109
Module start 'content' 0.00820.0066 776.343894.1406
Module end 'content' 0.01480.0016 870.484433.9922
Script end 0.0164  904.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002615.5869140.0002
Check MTime0.00116.5930140.0001
Mysql Total
Database connection0.00063.476510.0006
Mysqli_queries0.002615.610230.0009
Looping result0.00000.135010.0000
Template Total0.00137.710.0013
Template load0.00106.202610.0010
Template processing0.00021.509610.0002
Override
Cache load0.00084.584110.0008
General
dbfile0.001911.670680.0002
String conversion0.00000.061040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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