Display the Contents of a View as a Hierarchy

Hi All

I want to know whether we can display the contents of the view as a hierarchy, i.e. in a tree like structure.

e.g.

SBU

|-Project Manager

|-Project Leader

|-Module Leader

  |-Empoyees

I want the data in this format, as you see in different websites.

So, can anybody provide me soluton regarding this. It’s Urgent.

Thank You

Gayatri Gouda

Subject: RE: Display the Contents of a View as a Hierarchy

Hi,

Won’t a view categorized on the 2 categories that you want, serve the purpose?

Subject: RE: Display the Contents of a View as a Hierarchy

You might want to render the view as PassThru HTML. THis way you need to code the html elements (the table and tr td – or others). Then you can generate ul and li elements and use some JavaScript to render that into a tree. An unobstrusive JavaScript that transforms an ul into a tree can be found here:http://www.silverstripe.com/downloads/tree/

Hth

:slight_smile: stw

Subject: RE: Display the Contents of a View as a Hierarchy

Hello,

What about to categorize the view in one column.

Then you can put the entries in the form SBU\-Project Manager,

SBU\Project Leader, SBU\Module Leader or SBU\Empoyees in this column. The “\” is important it creates sub categories for e.g. Project Manager. It is like a tree structure.

hth Holger