the step for moveDown of each post also in this action are involved
parents and children so in the $newSort each post is as post_id =>
order number. So if I do it like you suggested, first I will have to
separate posts with same parent_id and then to moveDown each of them.
On Oct 28, 12:23 pm, AD7six <andydawso...@gmail.com> wrote:
> On Oct 28, 11:16 am, Constantin FF <constantin...@gmail.com> wrote:
>
> > Is there a better way for doing that? There is something similar in other
>
> I haven't written anything that implied/suggested/required changing
> your existing interface, only your php code.
>
> function _sortPosts($newSort){
> sort($newSort);
> foreach ($newSort AS $id => $value) {
> $this->Post->id = $id;
> $this->Post->moveDown(true);
> }
>
> ^That's what I suggested in your previous thread. if newSort is nested
> - adjust appropriately.
>
> AD
--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment