Forums / Setup & design / Generate menu of only folders
Felix Laate
Thursday 01 May 2003 4:38:37 am
Hi all!
I'm trying to make a menu containing the folders in a folder, i.e. not including any other objects that it contains (e.g. an infopage).
This is my code:
{let folder_list=fetch(content,list,hash(parent_node_id,16,sort_by,array(array(priority))))}
..
<table> {section name=Folder loop=$folder_list} <tr> <td class="menubutton" > <a href={concat("/content/view/full/",$Folder:item.node_id,"/")|ezurl}>{$Folder:item.name}</a></td> </tr> {/section} </table>
...
This results in a menu containg all elenments in node 16
Any help would be greatly appreciated!
Felix
Publlic Relations Manager Greater Stavanger www.greaterstavanger.com
Vivienne van Velzen
Thursday 01 May 2003 4:54:33 am
Felix,
You can define the class that you want to include. For instance, if Folder has class 1, you can try the following:
{let folder_list=fetch(content,list,hash(parent_node_id,16,sort_by,array(array(priority)), class_filter_type, include, class_filter_array, array(1)))}
....
{/let}
With class_filter_type you indicate if you want to include or exclude the classes in class_filter_array (in this case you want to include them, and nothing else).
Vivienne
Thursday 01 May 2003 11:59:40 am
Thanx alot!
Now I see the light...
:-) Felix