Wednesday, October 7, 2009

Re: Set:sort "A Set-compatible path"

On Wed, Oct 7, 2009 at 10:17 AM, alberto <alberto.priore@gmail.com> wrote:
>
> Where I can find the syntax of the variable $path that are passed to
> the Set:sort ?

For sort() you'll probably be using '{n}.ModelName.field_name'. The
'{n}' part represents the array index and you provide that exactly as
shown. You just need to change the 'ModelName' and 'field_name' bits.

The 2nd link here shows how to use '{s}', which is even more fun.

http://debuggable.com/posts/cake-12s-set-class-eats-arrays-for-breakfast:480f4dd6-d084-4fb7-bacc-49fdcbdd56cb
http://blogs.bigfish.tv/adam/2008/03/24/sorting-with-setsort-in-cakephp-12/
http://book.cakephp.org/view/640/Set

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate