_isSelectedBranch value not set on child records

4 posts by 3 authors in: Forums > CMS Builder
Last Post: March 2, 2009   (RSS)

Re: [aev] _isSelectedBranch value not set on child records

By ross - March 2, 2009

Hi there.

Thanks for posting!

I was curious if you could post me a link to an example of this. I am not quite sure what you mean :).

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] _isSelectedBranch value not set on child records

By aev - March 2, 2009

From the CMSB changelog:
http://www.interactivetools.com/products/cmsbuilder/changelog.html
- Categories: Added _isSelectedBranch field to getCategories() viewer function output


This field is supposed to tell if a record is in a selected category branch. This means that all records beneath a toplevel category where a record is selected should have _isSelectedBranch = 1.

Do a "print_r ($categoryRecords);" on a site using categories and you'll see what I mean. Maybe Dave can help.. I requested this feature to him.

-aev-

Re: [aev] _isSelectedBranch value not set on child records

By Dave - March 2, 2009

Hi aev,

I added this code to viewer_functions.php:
$category['_isSelectedBranch'] = $selectedCategory && preg_match("/:{$category['num']}:/", $selectedCategory['lineage']);

Do you want to email me direct and send me links to your example. We can add or change something if needed.
Dave Edis - Senior Developer
interactivetools.com