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 :)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.