go directly to the first sub folder

Author Message

Tiziano Zonta

Wednesday 11 May 2005 8:07:48 am

Hi,
I have this problem:i have 1 folder with some sub-folders inside.I whant to display the content on the first sub-folder when i click on the link of the parent-folder (whitout have a "middle-page").I am new in ezpublish (some weeks).How I can do this?

tnx

Tiziano

Lex 007

Wednesday 11 May 2005 8:59:22 am

I would use this kind of code (untested) :

{let 
firstchild=fetch('content',
        'list',
         hash( parent_node_id, $node.node_id,
          
                  limit,1 ))
}
    {section name=Child loop=$firstchild}
        {node_view_gui view=full content_node=$:item}
    {/section}
{/let}

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

Main resources:

Total runtime0.5448 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.1563152.6250
Module start 'layout' 0.00530.0030 741.781339.4609
Module start 'content' 0.00830.5349 781.2422490.6094
Module end 'content' 0.54330.0015 1,271.85168.3125
Script end 0.5447  1,280.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.5858160.0002
Check MTime0.00130.2348160.0001
Mysql Total
Database connection0.00070.122110.0007
Mysqli_queries0.503892.4802540.0093
Looping result0.00040.0808520.0000
Template Total0.511593.920.2557
Template load0.00190.353920.0010
Template processing0.509693.537920.2548
Template load and register function0.00020.032910.0002
states
state_id_array0.00100.179910.0010
state_identifier_array0.00120.228920.0006
Override
Cache load0.00160.2867110.0001
Sytem overhead
Fetch class attribute can translate value0.00070.130920.0004
Fetch class attribute name0.00130.233530.0004
XML
Image XML parsing0.00080.140220.0004
class_abstraction
Instantiating content class attribute0.00000.001830.0000
General
dbfile0.00090.1692160.0001
String conversion0.00000.001440.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs