HI Guys,
I need you help guys.,, I'm getting confuse about using containable
behavior, my problem is, I want to limit the output of [parseditem]
have seen there are 3 feeds item 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.
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