> HI Guys,
>
> I need your help guys.,, I'm getting confuse about using containable
> behavior, my problem is, I want to limit the output of [parseditem]
> have you seen below there are 3 feeds items I want to display only
> one.. what are the possible solution to achieve this.
>
> Here is my Controller code:
>
> $this->Feed->Behaviors->attach('Containable');
> $this->paginate = array('Category' => array('recursive'
> =>2,'contain'=>array('Feed','Parseditem' => array('limit' => 2))));
>
> But it is not yet working, like what I have expected.
>
> Here is the data structure.
>
> [0] => Array
> (
> [Category] => Array
> (
> [id] => 1
> [name] => asian food
> [slug] => asian-food
> )
>
> [Feed] => Array
> (
> [0] => Array
> (
> [id] => 1
> [feed_url] =>
> http://steamykitchen.com/blog/feed
> [title] =>
> [popularity] => 7
> [error] => 0
> [Parseditem] => Array
> (
> [0] => Array
> (
> [id] => 796
> [feed_id] => 1
> [datetime] => 2011-01-28
> 11:12:42
> [permalink] =>
> http://feedproxy.google.com/~r/SteamyKitchen/~3/Jh82Omii8DQ/13565-chipotle-cinnamon-wings-recipe.html
> [title] => Smoky Sweet
> Spicy Chipotle Cinnamon Wings
> [excerpt] =>
> )
>
> [1] => Array
> (
> [id] => 121
> [feed_id] => 1
> [datetime] => 2011-01-28
> 11:12:42
> [permalink] =>
> http://feedproxy.google.com/~r/SteamyKitchen/~3/Jh82Omii8DQ/13565-chipotle-cinnamon-wings-recipe.html
> [title] => Smoky Sweet
> Spicy Chipotle Cinnamon Wings
> [excerpt] =>
> )
>
> [2] => Array
> (
> [id] => 366
> [feed_id] => 1
> [datetime] => 2011-01-28
> 11:12:42
> [permalink] =>
> http://feedproxy.google.com/~r/SteamyKitchen/~3/Jh82Omii8DQ/13565-chipotle-cinnamon-wings-recipe.html
> [title] => Smoky Sweet
> Spicy Chipotle Cinnamon Wings
> [excerpt] =>
> )
>
> [3] => Array
> (
> [id] => 581
> [feed_id] => 1
> [datetime] => 2011-01-28
> 11:12:42
> [permalink] =>
> http://feedproxy.google.com/~r/SteamyKitchen/~3/Jh82Omii8DQ/13565-chipotle-cinnamon-wings-recipe.html
> [title] => Smoky Sweet
> Spicy Chipotle Cinnamon Wings
> [excerpt] =>
> )
>
> )
>
> )
>
> Thank you in advance guys for your favorable response.
you need to add your limit to parsed item via Feed
$this->paginate = array('Category' =>
array('recursive'=>2,'contain'=>array('Feed'=>array('Parseditem' =>
array('limit' => 2)))));
you shouldnt also need to use recursive and contain - one or the other.
>
> Joseph P. Buarao
> Web Developer
> Azure Web Design.com
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>
>
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php