Sorting nodes and subnodes in alphabetical order

Author Message

Piotr Kwiatkowski

Wednesday 26 May 2004 11:04:44 pm

I have got node structure like this:

AFolder1
----- ACategory
----- BCategory
BFolder2
----- ACategory
----- BCategory

I want to display them in that order I present, so the Categories are in the top level and subcategories are specified categorie. Categories and subcategories must be in alphabetical order.

I have done sth like this:

{let children=fetch('content', 'tree', hash(parent_node_id,$node.node_id,
		                        sort_by,$node.sort_array,
			                offset,$view_parameters.offset))}

{section name=Child loop=$children}
    {node_view_gui view=line content_node=$Child:item}
{/section}

But this only present categories and subcategories in alphabetical order without structure I present at the beginning.

I know how to do this using 2 section and 2 let definitions. But I want to this in one {section} and {let} definition.

Thank for help.

Best regards.

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 31 2025 06:13:29
Script start
Timing: Jan 31 2025 06:13:29
Module start 'layout'
Timing: Jan 31 2025 06:13:29
Module start 'content'
Timing: Jan 31 2025 06:13:29
Module end 'content'
Timing: Jan 31 2025 06:13:29
Script end

Main resources:

Total runtime0.0114 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.0037 588.2813151.2266
Module start 'layout' 0.00370.0016 739.507836.6797
Module start 'content' 0.00520.0051 776.187586.1094
Module end 'content' 0.01030.0011 862.296929.9922
Script end 0.0114  892.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.001916.6283140.0001
Check MTime0.00098.0986140.0001
Mysql Total
Database connection0.00054.185310.0005
Mysqli_queries0.001614.179930.0005
Looping result0.00000.071210.0000
Template Total0.00087.310.0008
Template load0.00075.731810.0007
Template processing0.00021.554810.0002
Override
Cache load0.00054.177010.0005
General
dbfile0.002017.367080.0002
String conversion0.00000.052340.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.0001 secs