Forums / Setup & design / Treemenu with several subfolders

Treemenu with several subfolders

Author Message

glenn terjesen

Monday 07 March 2005 11:49:44 pm

hi, im having trouble creating a treemenu on one of my subpages.
I've successfully created a treemenu with one sublevel with help from your
"howto" :The links page::Creating a tree-style appearence

example :

-menu
--article1
--article2
-menu2
--article3

But I need one folder more like this:

-menu
--submenu1
---article1
---article2
--submenu2
---article3

I know there's a javascript popupmenu, but with very poor docs..
Is it possible to get some help/guide to get this work ?
Anyone got any examples perhaps..

Thx

Ɓukasz Serwatka

Tuesday 08 March 2005 12:04:50 am

Hi,

You should add one level more. Here is good example to fourth level.
http://ez.no/ez_publish/documentation/customization/tips_tricks/creating_tree_menus

I hope it will help.

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

glenn terjesen

Tuesday 08 March 2005 1:29:28 am

Thx alot :)
had to change the line "....class_filter_array, array(1)..." to
"...class_filter_array, array('article','folder')..." to show articles..
hmm.. found another problem
How to make a {switch} based on to show the contents of a folder or a article..
I can paste both the design/base/override/templates/full/article.tpl and the folder.tpl
into my .tpl file.. but creates alot of errors in debug mode.

glenn terjesen

Tuesday 08 March 2005 3:13:28 am

*solved nearly*
Howto find out if a object is a article or a folder:

{switch match=$node.object.contentclass_id}
{case match=1} {*folder*}
List articles from current folder
{/case}
{case match=2} {*article*}
List articles from parent folder
{/case}
{/switch}

hmm.. now i need something to bypass the damn cache..

Eivind Marienborg

Tuesday 08 March 2005 3:28:14 am

To bypass cache, add this to the beginning of your template:

{set-block scope=root variable=cache_ttl}0{/set-block}

glenn terjesen

Tuesday 08 March 2005 4:10:43 am

Weird..
The {switch} works..
If I click a article first(after i cleared the cache) in my menu, the articles show perfectly, but not the contents of the folders. and visa versa.

didnt't help to insert a cache block on the top of my .tpl file.

did it make any sense ?

glenn terjesen

Tuesday 08 March 2005 4:40:24 am

bah :)
solved dumped the switch, created two templates, one for articles and one for folders.
works like a charm :)

eZ debug

Timing: Jan 18 2025 18:40:44
Script start
Timing: Jan 18 2025 18:40:44
Module start 'content'
Timing: Jan 18 2025 18:40:45
Module end 'content'
Timing: Jan 18 2025 18:40:45
Script end

Main resources:

Total runtime0.9930 sec
Peak memory usage4,096.0000 KB
Database Queries208

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 587.7344180.8281
Module start 'content' 0.00770.8515 768.5625633.7734
Module end 'content' 0.85920.1337 1,402.3359337.0859
Script end 0.9929  1,739.4219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.4377210.0002
Check MTime0.00160.1570210.0001
Mysql Total
Database connection0.00110.108110.0011
Mysqli_queries0.896990.31892080.0043
Looping result0.00220.22442060.0000
Template Total0.947295.420.4736
Template load0.00210.213120.0011
Template processing0.945195.175520.4725
Template load and register function0.00020.020210.0002
states
state_id_array0.00120.123510.0012
state_identifier_array0.00070.075220.0004
Override
Cache load0.00190.1919630.0000
Sytem overhead
Fetch class attribute can translate value0.00110.113840.0003
Fetch class attribute name0.00130.126890.0001
XML
Image XML parsing0.00150.154740.0004
class_abstraction
Instantiating content class attribute0.00000.001790.0000
General
dbfile0.00810.8142350.0002
String conversion0.00000.000530.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 34
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs