views:

35

answers:

1

For the title field,I want to return node.title,but what I tried is not working:

return array('og' => array('name' => 'og',
            'join' => array('left' => array('table' => 'node',
                    'field' => 'nid'
                    ),
                'right' => array('field' => 'nid'
                    ),
                ),
            'fields' => array(
                'title' => array('name' => t('OG: Group: Group name'),
                    'table' => 'node',
                    'handler' => 'og_handler_field_title',
                    'help' => t('show group name.'),
                    'sortable' => true,
                    'sort_handler' => 'views_og_query_ogname',
                    'notafield' => false,
                    ),
A: 

I haven't used views for Drupal 5, so I might be a bit off. But when you make a join on the node, you shouldn't actually need to create the node title field yourself. You should instead be able get it directly from the node table like you would for a normal node.

Your field declarations should only be for the fields you have in the table you want to integrate into views.

googletorp