Different treemenu for different folder

Author Message

Leandro Alves

Friday 17 February 2006 2:31:06 pm

Hi

I have the following structure of content:

-folder (node: 50)
.|
.|-folder1 (node: 60)
...|
...|-article
...|-article
...|-folder
.......|-article
.......|-article
...|
...|-folder
.......|-article
.......|-article
.|
.|-folder2 (node: 70)
...|
...|-article
...|-article
...|-folder
.......|-article
.......|-article

Depends on which item I click, I would like to have a list like a menu.

I could set up an override file for each folder (70 and 60) and make a list with this code:

{let category_list=fetch( content, list, hash( parent_node_id, [NODE_FOLDER],
                                               class_filter_type, include,
                                               class_filter_array, array('folder','article') ) )}

   {section var=category loop=$category_list}
      <a href={$category.item.url_alias|ezurl}>{$category.item.name|wash}</a>
                           
         {let news_list=fetch( content, list, hash( parent_node_id, $category.item.node_id,
                                                    class_filter_type, include,
                                                    class_filter_array, array('article') ) )}

            {section var=newsitem loop=$news_list}
               <a href={$newsitem.item.url_alias|ezurl}>{$newsitem.item.name|wash}</a>
            {/section}

         {/let}
   {/section}
{/let}

I will have many itens inside the folder(50) and I wouldn't like to create an override file for it every item.

How can I use treemenu operator or somenthing like that to make a different menu for each item inside the folder(50) without have to create many override files?

If I click on folder1(60) I would like to have a menu with all its contents and keep this menu while its children were accessed. It would be the same for folder2(70).

Thanks in advance!

Leandro

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 18 2025 19:10:17
Script start
Timing: Jan 18 2025 19:10:17
Module start 'layout'
Timing: Jan 18 2025 19:10:17
Module start 'content'
Timing: Jan 18 2025 19:10:17
Module end 'content'
Timing: Jan 18 2025 19:10:17
Script end

Main resources:

Total runtime0.0297 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.0093 588.0313152.6406
Module start 'layout' 0.00930.0044 740.671939.4766
Module start 'content' 0.01370.0129 780.148489.3516
Module end 'content' 0.02670.0030 869.500030.3047
Script end 0.0297  899.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003712.5176140.0003
Check MTime0.00155.0828140.0001
Mysql Total
Database connection0.00217.003410.0021
Mysqli_queries0.004715.954030.0016
Looping result0.00000.050510.0000
Template Total0.00258.410.0025
Template load0.00175.611210.0017
Template processing0.00082.788410.0008
Override
Cache load0.00103.223010.0010
General
dbfile0.004816.283680.0006
String conversion0.00000.029740.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.0002 secs