I am very unsure about this, but I believe you might be looking for Set::classicExtract()
http://api.cakephp.org/class_set.html#e8412492e8a6c81939b4fb037043eaa3 Hope that helps! On Jan 23, 1:42 pm, Jon Bennett <[email protected]> wrote: > hi, > > I'm sure this is possible, it's just alluding me at present! > > I have 2 models: > > MixtureCategory > Mixture > > MixtureCategory is a parent/child self association, so I'm getting the > data like so: > > $this->data = $this->MixtureCategory->find('threaded'); > > I'm looping over $this->data in my view, but only need to display info > about the top level category, and would like to output list of links > to all mixtures that belong to a second level category. > > foreach($this->data as $category): > > // name > echo $category['MixtureCategory']['name']; > > // mixtures > $mixtures = array_combine( > Set::extract($category, > 'children.{n}.MixtureCategory.{s}.Mixture.name'), > Set::extract($category, > 'children.{n}.MixtureCategory.{s}.Mixture.slug') > ); > > // test > debug($mixtures); > > endforeach; > > this gives me total garbage though. > > any ideas? > > cheers, > > Jon > > -- > > jon bennett > w:http://www.jben.net/ > iChat (AIM): jbendotnet Skype: jon-bennett --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
