Forums / Setup & design / Fetch array of all nodes..

Fetch array of all nodes..

Author Message

Felix Laate

Thursday 02 October 2003 1:12:31 pm

Hi all!

I want to make som "next" and "back" buttons that takes you to the next or the prior node in the node-tree. Does anyone know how to do this?

If not, here's my strategy: I want to make an array of all the nodes in the tree and then make links to the next and prior elements in the array..

Any suggestions would be greatly helpfull..!

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Albert Berenguer

Friday 03 October 2003 7:14:05 am

hi,
to get an array containing all the nodes of your content tree you can use a tipical fecth function but replacing 'list' for 'tree', sthg like this:

{let folder_list=fetch('content','tree', hash(parent_node_id, $node.node_id)}

i think that if you don't indicate any sorting in the function, the nodes will be sorted as they come in the content tree, you better test it by yourself :)

i hope i helped in some way, bye!!