Need to fetch category record.

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

Re: [rconring] Need to fetch category record.

By Chris - March 9, 2010

Hi Ron,

getCategories returns a list of records and the "selected" record, not a list of records and "metaData". You'll want to change this:

list($animal_categoriesRecords, $animal_categoriesMetaData) = getCategories(array(

to this:

list($animal_categoriesRecords, $animal_categoriesSelected) = getCategories(array(

By default, getCategories() decides which record is "selected" using the last number in the URL, which I think will just do the right thing for you here. You can then use fields from the $animal_categoriesSelected record to display the info you want.

I hope this helps! Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Need to fetch category record.

By rconring - March 10, 2010

Thanks a milloin, Chris!

That did the trick.

I have looked for documentation on the various functions for category lists and cannot seem to find any one document that fully explains all of the the functionality and implementation.

Fortunately, this is such a good forum, I got enough info to get the job done.

Thanks again and have a nice day, Chris!
Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987