Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
4826 Представления

Hi,

is there a way to group by a field in a search view in a case insensitive way?

i.e. grouping "leo" and "Leo" together.

Thanks!

Аватар
Отменить
Лучший ответ

AFAIK you have to redefine ``read_group`` to fit your needs.

 

 

Аватар
Отменить
Автор Лучший ответ

Nicolas is right: to do that I have to change read_group. It is a big method with no hooks, so the solution for now has been to copy all of it in my module and add a few lines similar to those the handle dates in the original code.

Date handling in the original is somewhat similar: dates from the same month are grouped together, while I wanted to group together string fields that are equal ignoring case.

That has been refactored in trunk to be hookable.

Thanks!

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
мая 24
1818
1
июл. 21
2766
0
апр. 16
4325
1
мая 15
3971
0
янв. 25
2528