[ic] Tree - have only subcats display products

Jonathan Clark interchange-users@interchange.redhat.com
Wed Mar 27 13:51:01 2002


> When you say that all I'd have to do is start with a category
> instead of the root of the tree, would I then have to hard code
> each of these, or would there be a way to somehow modify the tree
> code to do this automatically during the building routine?
>
no. the tree tag has a parameter 'start='. This defines where the tree will
start, so you could display a tree starting at 'root' of at 'cat1'.

I have a page called tree.html which, if passed no 'start' parameter, will
display a tree starting at the root. If I pass it a start parameter, it will
start my tree at that point, that way I have one page which will do all my
tree type displaying. This is probably the sort of thing you need to create.

> Also, since the tree and branches need to be built, would I have
> to build each branch and individual sub-branch to get this to work?

You only build the tree in a table which provides parent-child links. The
tree tag does the rest.

>
> What I'm trying to get to is to call one building page. Then, my
> tree and all of its branches are built in one shot. Each sub page
> would show the proper subcats and any relevant items.

Think about it. Thats all one page - the page displays a tree, and any items
at that level. The [tree] tag allows you to 'toggle' a branch open to drill
down further, it looks like you just need to exclude this functionality.

I do this for a 'file management' type of thing. The tree page displays a
list of folders, and any files at that level, it also allows you to drill
down, and display folders and files at the lower levels. In your case, think
categories for folders and items for files.

>
> As far as I can tell, this would be Category Nirvana.
>

its not far away...

best wishes,

Jonathan
Webmaint.