[development] Creating a custom filter without real field
Lluís Forns
enboig at gmail.com
Mon Aug 22 08:10:10 UTC 2011
Thanks, it works now.
2011/8/19 Christian López Espínola <clopez at emergya.es>:
> Hola Lluis,
>
> On Fri, Aug 19, 2011 at 2:47 PM, Lluís Forns <enboig at gmail.com> wrote:
>> I need to filter repeated fields (not nid, so distinct don't work) in
>> some views. I found how to make it using
>> hook_views_pre_render(&$view). I want to make a module to "tag"
>> displays that must be filtered.
>>
>> To do so I have created a filter; where you choose which fields should
>> be unique. Then I am trying to use hook_pre_render() to eliminate the
>> results; but in $vews->result there are fields alias, and I just have
>> fields id. How can I translate field id to field alias?
>
> Check view->field['field_my_id_value']->field_alias.
>
>
>> Thanks.
>>
>> (I can post code if needed)
>> --
>> *La vida no ha de ser feliç, ha de ser plena.
>> *Abans d'imprimir aquest missatge, pensa en el medi ambient.
>>
>
>
>
> --
> Christian López Espínola
> Área de Proyectos
>
> Emergya Consultoría
> Tfno: +34 954 51 75 77
> Fax: +34 954 51 64 73
> www.emergya.es
>
--
*La vida no ha de ser feliç, ha de ser plena.
*Abans d'imprimir aquest missatge, pensa en el medi ambient.
More information about the development
mailing list