Do you mean i have to query the other model inside the article
controller..

I tried it like this (using the category model now):
function category($category_name)
{
$this->set('articles',  $this->paginate('Category', array('name' =>
$category_name)));
}

But then it uses the fields i have set in the article_controller,
which are not available in the category :(

        // Pagination settings
        var $paginate = array('limit' => 15,
        'page' => 1,
        'order'=>array('id' => 'desc'),
        'fields' => array('id', 'title', 'published', 'frontpage', 'created',
'modified', 'slug', 'menu_id'));

On Aug 16, 1:39 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> You cannot query across a HABTM like that - the relationships are
> generated through multiple SQL queries so your WHERE does not get put
> in the right part (and the WHERE is just whatever conditions you
> provide - Cake does not understand what you want).
>
> Instead, query the Menu model, with appropriate recursive set (and
> bindModel / unbindModel if needed) to get the associated Articles that
> you want.
>
> On Aug 16, 3:17 am, Mech7 <[EMAIL PROTECTED]> wrote:
>
> > Nobody :(
>
> > On Aug 12, 4:51 pm, Mech7 <[EMAIL PROTECTED]> wrote:
>
> > > Anybody has an idea ? :(


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to