Re: Creating a custom filter without real field

Lluís Forns <[email protected]>
Newsgroups gmane.comp.php.drupal.devel
Message-ID <CAGTZhB701sDYo8mfcjY9b0RYQs4gg_hG9KCmxT-qc5T=0xcf7w@mail.gmail.com>
Thanks, it works now.

2011/8/19 Christian López Espínola <[email protected]>:
> Hola Lluis,
>
> On Fri, Aug 19, 2011 at 2:47 PM, Lluís Forns <[email protected]> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.