Expanding list, forgets its parent node and collapses

Author Message

Chris Glubish

Tuesday 24 August 2004 8:44:05 am

I have a simple list of objects. (some folders, some articles). When one is clicked, it opens down IF its a folder, or if its an article, just goes to the article. This works fine on the first level, but the minute I click down into a sublevel (folder or article) the list collapses. Essentially its a tree menu, but I have kept it sort of clunky on purpose. Is this easy to fix or do I have to redo the entire logic. Here is my code. (node 83 is the hard coded parent node for the top level of the folder)


{* Loop through all sub-folders/articles within the folder. *}
{section loop=fetch( content,
                     list,
                     hash( parent_node_id,     83,
                           class_filter_type,  include,
                           class_filter_array, array( 'article' ,'folder'),
                           sort_by,            $item.sort_array ) ) }

{* Display the folder-name or article as a link to a full view of the node if it is NOT the node we are on. If we are on the current node, just show plain unclickable text.*}
{section show=or( $:item.node_id|eq($node.node_id ))}
        {$:item.name}
{section-else}
       <a href={concat( "/content/view/full/", $:item.node_id, "/" )|ezurl}>
           {$:item.name}
       </a>
{* End of if-section. *}
{/section}

    <br />


{* Check if this node(folder) is the one that was accessed: *}
{section show=or( $:item.node_id|eq($node.node_id ))}

    {* Loop through all the nodes within this folder. *}
    {section loop=fetch( content,
                     list,
                     hash( parent_node_id,     $:item.node_id,
                           class_filter_type,  include,
                           class_filter_array, array( 'article' ),
                           sort_by,            $:item.sort_array ) ) }

    {* Display the name of each node as a link. *}
    <div style="margin-left: 8px;">
    <a href={concat( "/content/view/full/", $:item.node_id, "/" )|ezurl}>
        {$:item.name}
    </a>
    </div>

{* End of link-list loop. *}
{/section}

{* End of if-section. *}
{/section}


{* End of sub-folder loop. *}
{/section}

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 19 2025 03:32:45
Script start
Timing: Jan 19 2025 03:32:45
Module start 'layout'
Timing: Jan 19 2025 03:32:45
Module start 'content'
Timing: Jan 19 2025 03:32:46
Module end 'content'
Timing: Jan 19 2025 03:32:46
Script end

Main resources:

Total runtime1.2573 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.3984152.6563
Module start 'layout' 0.00540.0029 742.054739.5078
Module start 'content' 0.00831.2475 781.5625409.0234
Module end 'content' 1.25570.0015 1,190.58598.1094
Script end 1.2573  1,198.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2754160.0002
Check MTime0.00140.1101160.0001
Mysql Total
Database connection0.00100.079810.0010
Mysqli_queries1.221697.1578460.0266
Looping result0.00040.0292440.0000
Template Total1.224997.420.6124
Template load0.00260.207820.0013
Template processing1.222397.209620.6111
Template load and register function0.00020.013610.0002
states
state_id_array0.00120.092310.0012
state_identifier_array0.00300.236320.0015
Override
Cache load0.00210.168850.0004
Sytem overhead
Fetch class attribute can translate value0.00120.095410.0012
Fetch class attribute name0.00050.040210.0005
XML
Image XML parsing0.00010.009510.0001
class_abstraction
Instantiating content class attribute0.00000.000210.0000
General
dbfile0.00070.0584100.0001
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 5
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs