Share » Forums » Setup & design » Treemenu with several subfolders

Treemenu with several subfolders

Treemenu with several subfolders

Monday 07 March 2005 11:49:44 pm - 6 replies

Modified on Tuesday 08 March 2005 2:53:18 am by glenn terjesen

Author Message

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

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu