跳至內容
選單
此問題已被標幟
2 回覆
4867 瀏覽次數

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!

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
9月 25
1863
1
7月 21
2801
0
4月 16
4369
1
5月 15
3991
0
1月 25
2632