so far i am using one $paginate variable to find data from a habtm
relation (user habtm products).
public $paginate = array('Product' => array('limit' => 10, 'joins' =>
array(
array(
'table' => 'products_users',
'alias' => 'ProductUser',
'type' => 'inner',
'conditions'=> array('ProductUser.product_id =
Product.id')
),
array(
'table' => 'users',
'alias' => 'User',
'type' => 'inner',
'conditions'=> array(
'User.id = ProductUser.user_id'
)
))));
I echo the result in an element called "paging" and include the
element in my view, so you can see on a users profile what products he
has. for transparency i defined a limit of 10 result, showed in a div.
<div id="paging">
<?php echo $this->element('users/paging'); ?>
</div>
It works fine. but now i want to give profile visitors the opportunity
to see ALL products of that user and not just 10.
the IDEA: you click on a link a popup opens showing ALL products. so i
thought i just define another $paginate variable "$paginate_all"
without setting a limit and render it in a new view...
but i get the error
call to undefinded method UserController:: paginate_all() in .......
did i sth wrong or can't I just define multiple $paginate variables?
thank you :)
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment