Forums / Setup & design / Sorting nodes and subnodes in alphabetical order

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.