Recursive Look-up Through Category Lineage

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 27, 2013   (RSS)

By Perchpole - April 26, 2013

Hello, All

I'm trying to think-up a method for recursively looking back through a category lineage in search of a value. The process would begin with the selectedCategory:

If the value isset, then use that value.

If there is no value then check to see if there is a parent category. If yes and if the value isset, then use that value.

If there is no value then check to see if there is a parent category....

And so on and so forth until a value is found or the selectedCategory runs out of ancestors.

How could I set this up?

:0)

Perch

By Perchpole - April 27, 2013

Greg,

This is brilliant - and could have various uses.

Thanks,

Perchpole