[development] views2: how to add "link to node" in custom filed
Larry Garfield
larry at garfieldtech.com
Mon May 4 13:49:15 UTC 2009
A field handler can implement another method to specify additional fields that
it will need beyond the exact one mapped in the data hook. I forget the exact
format off hand, but I know the views module uses it somewhere, probably as
part of the title or "link to node" fields provided by the main system.
On Monday 04 May 2009 5:01:15 am Lluís wrote:
> I solved it adding a "nid" field and inserting it inside the view, but
> exluding it from visibility.
>
> On Mon, May 4, 2009 at 11:01 AM, Lluís <enboig at gmail.com> wrote:
> > I have created a custom node and now I am addint "views support" to
> > it. I have a custom field which should be a link to the full node; I
> > added:
> >
> > $data['node_cc_projects']['long_name'] = array(
> > 'title' => "long name", //trans
> > 'help' => 'long name of the node.', //trans
> > 'field' => array(
> > 'field' => 'long_name',
> > 'handler' => 'views_handler_field_node',
> > 'click sortable' => TRUE,
> > ),
> > 'sort' => array(
> > 'handler' => 'views_handler_sort',
> > ),
> > 'filter' => array(
> > 'handler' => 'views_handler_filter_string',
> > ),
> > );
> >
> > but the link created is "?q=node/" without the node number. What am I
> > missing?
> >
> > thanks
> >
> > --
> > *La vida és com una taronja, què esperes a exprimir-la?
> > *Si creus que l'educació és cara, prova la ignorància.
> > *La vida és com una moneda, la pots gastar en el que vulguis però
> > només una vegada.
> > *Abans d'imprimir aquest missatge, pensa en el medi ambient.
--
Larry Garfield
larry at garfieldtech.com
More information about the development
mailing list