Friday, April 30, 2010

Re: How to output UTF-8 sign?

You should think more on all the information available to you in the
view!
You already have:
1) the field name by which the sort is performed.
2) the sort direction for the chosen field name.
3) the list of fields which are sortable.

So you should be able to think it through and arrive at something like
this:
[code]
// Reset the sort direction for each sortable field.
$sortable = array('name' => 'sort_none','country' =>
'sort_none');

// Set the sort direction for the chosen sort field.
if (isset($this->params['named']['direction'])) {
$sortable[$this->params['named']['sort']] = 'sort_'.$this-
>params['named']['direction'];
}

// Present the sortable fields with the specified sort CSS classes.
foreach($sortable as $sortFieldName => $sortCssClass) {
echo $paginator->sort(ucfirst($sortFieldName),
$sortFieldName,array('class' => $sortCssClass));
}
[/code]

You can look at my site, see one of the previous posts, where the
above is implemented. No zip-file this time, am too busy :)
Enjoy,
John

On Apr 30, 11:41 pm, sebb86 <kahlc...@googlemail.com> wrote:
> Well, I don't know at which position in the source code, i have to
> reset it.
> I would reset with this source code: $sortCssClass = 'sort_none';
> I think, i need to know, which column header is clicked and then i
> have to reset all others.
> Could you give me a last hint please?
>
> Thanks!
>
> 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 cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com 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 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

No comments: