Re: [symfony-users] Nested set rendering

2010-02-02 Thread Romain Pouclet
Thanks for your help, it works :) For those who are interested, here it is : http://gist.github.com/292543 Cheers ! Le 1 févr. 2010 à 16:57, Bernhard Schussek a écrit : > You could, for instance, write a recursive render helper: > > function render_nested_set(Doctrine_Collection $collection) >

Re: [symfony-users] Nested set rendering

2010-02-01 Thread Romain Pouclet
Problème is, I want my rendering to follow a path, as you can see in my "example". Anyway, a recursive render helper is a good start I guess! Maybe I should add a 'path' parameter helper to make something like : function render_nested_set(Doctrine_Collection $collection, array $path) { // ... }

Re: [symfony-users] Nested set rendering

2010-02-01 Thread Bernhard Schussek
You could, for instance, write a recursive render helper: function render_nested_set(Doctrine_Collection $collection) { $output = "\n"; foreach ($collection as $record) { $output .= "".$record; // __toString(), or whatever you like if ($record->getNode()->hasChildren()) {

[symfony-users] Nested set rendering

2010-02-01 Thread Romain Pouclet
Hi there, I'm heavily working w/ Doctrine NestedSet behavior. I have a tree I'd like to render in a complex way. Let say I have a path for my selected node : node1 > node2 > node3 I'd like to render it so I can display : node 1 sibling 1 node 1 sibling 2 node 1 sibling 3 node 1 node