Hi,

I really don't get it sorted out...

my degault sort direction is ASC

in my view I have this:

<?php
            $sortDir = $paginator->sortDir();
            $text = ($sortDir == 'asc')?__('getting higher',
true):__('getting lower', true);
        ?>
        <?php echo $this->Paginator->sort($text, 'OBJ_PREIS', $options
= array('escape' => false, 'class' => 'sortdefault')); ?>

on default, when I load the page the is shown as
<a class="sortdefault" href="/gesamtobjekt/search/page:1/
sort:OBJ_PREIS/direction:asc">getting higher</a>

When I click it, I get the same page again which is sorted by ASC and
the links is still
<a class="sortdefault" href="/gesamtobjekt/search/page:1/
sort:OBJ_PREIS/direction:asc">getting higher</a>

When I click again it does the right thing, it sorts by DESC and the
links is nicly
<a class="sortdefault asc" href="/gesamtobjekt/search/page:1/
sort:OBJ_PREIS/direction:desc">getting lower</a>

But now I can see that cake added a class named asc <a
class="sortdefault asc" hr.....
I have no idea where this comes from and what it does...?

But anyway, what can I do to have on the default page load the results
sorted by default ASC and the sort link to sort DESC?

Please help!!

Thanks!!

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to