Company Division 1 Department Team 1 Employee 1 Employee 2 Team 2 Department 2 Team 3 Employee 3 Employee 4 Team 4 Department 3 Department 4 Division 2
I want to be able to tell if any employee, or team or dept is under Division 1. With the posibility that there may be further levels deeper at a later stage
Imagine these are product categories as opposed to an obvious compant structure. I copied it from elsehwere to save time
I think that gives you the whole structure, perhaps you can get the path to your current category in that whole tree, and then access the relative top level element?
I'm very hazy when it comes to doing that kind of thing in XSLT.
Test up the category tree
Is there an easy way to test whether a category is a descendent of a specific one without looping through the parent IDs?
What's wrong with testing parentID == wantedID? Do you have an example what you want to achieve?
Bye
Christian
Let's say this
I want to be able to tell if any employee, or team or dept is under Division 1. With the posibility that there may be further levels deeper at a later stage
Imagine these are product categories as opposed to an obvious compant structure. I copied it from elsehwere to save time
No-one? Seriously?
Is there any way to use DynamicNodeContext? Get a tree that contains a certain category id and then test if it contains the specified parent?
I asked a similar question a while back, and Søren suggested the following.
I never got around to using it actually (used a horrible parent test mashup thing because I was in a hurry)
I think that gives you the whole structure, perhaps you can get the path to your current category in that whole tree, and then access the relative top level element?
I'm very hazy when it comes to doing that kind of thing in XSLT.
If you find a good solution please post it! :)
Zac
is working on a reply...