On Fri, Oct 2, 2009 at 5:49 AM, Melanie Sommer
<[email protected]> wrote:
>
> Hello,
>
> I am using containable behaviour in paginate() in my controller namend
> "E".
>
> In my view I can use sort('title of cell in table E') to sort the
> results. But I did not find a way to sort by any fields not belonging
> to table E.
>
> I tried sort('D.cell name') - but the syntax seems to be wrong.
>
> So, what is the correct syntax for $key in PaginatorHelper::sort()
> when using containble behaviour?
The first param is the text to display in the link. Cake can usually
figure out what to do if it's also a field name (or something like
that). Try putting the Model.field_name as second param:
$paginator->sort('text in link', 'D.cell name', array('title' =>
'title attribute of link'))
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---