You have to check for what is the current sort direction and then
apply the correct class to the paginator->sort(...) options.

I have made an example at:
http://jaa.myftp.org:28880/examples/paginator_sort_arrows

At first the order is unordered, as that is how the records are in the
database (only 5 records in total, but enough to show the
possibility).

By clicking on the name link, the list will be ordered by ascending
order and the up arrow will be shown.
Next click on the link will order the list by descending order and the
down arrow will be shown.

The examples uses the fact that the paginator passes named parameters
back to the controller and the named parameters are also available in
the view, so I simply use the "direction" named parameter to find out
whether the order is "asc" or "desc" or none in case of the first time
view.

The view file is available in the zip-file on the page.

You should take the time to read a little more from the CakePHP book,
it will help you a lot.
Enjoy,
   John




On Apr 22, 10:17 am, sebb86 <[email protected]> wrote:
> Hello again and thanks.
> I got an arrow in my column header. But its every time (asc or desc)
> the same arrow, so i think, the paginate source code is still wrong.
> My problem is still, that i dont know how to combine two classes in
> one paginate function.
>
> [code dont works]
> <?php echo $paginator->sort('id', 'id', array('class' => 'asc'),
> array('class' => 'desc'));  ?>
> [/code]
>
> [code also dont works]
> <?php echo $paginator->sort(array('id', 'id'), 'id', array('class' =>
> 'asc', 'class' => 'desc'));  ?>
> [/code]
>
> Do you have a last hint for me?
> Regards.
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

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

Reply via email to