поставил модуль node_galleries
пытаюсь создать views с отображением альбомов, но отображаются получается что альбомы "размножаются" из за того что в запрос составляется таким образом:
SELECT node.nid AS nid,
node_galleries_gallery.gid AS node_galleries_gallery_gid
FROM node node
INNER JOIN node_galleries node_galleries_gallery ON node.nid = node_galleries_gallery.gid
node_galleries_gallery.gid AS node_galleries_gallery_gid
FROM node node
INNER JOIN node_galleries node_galleries_gallery ON node.nid = node_galleries_gallery.gid
а надо чтобы было так:
SELECT node.nid AS nid,
node_galleries_gallery.gid AS node_galleries_gallery_gid, node_galleries_gallery.is_cover AS node_galleries_gallery_is_cover
FROM node node
INNER JOIN node_galleries node_galleries_gallery ON node.nid = node_galleries_gallery.gid WHERE node_galleries_gallery.is_cover > 0
node_galleries_gallery.gid AS node_galleries_gallery_gid, node_galleries_gallery.is_cover AS node_galleries_gallery_is_cover
FROM node node
INNER JOIN node_galleries node_galleries_gallery ON node.nid = node_galleries_gallery.gid WHERE node_galleries_gallery.is_cover > 0
не знаю где в модуле что вставлять похоже за это отвечает вот этот кусок кода:
<?php$data['node_galleries_gallery']['table']['group'] = t('Node Gallery');
$data['node_galleries_gallery']['table']['join'] = array(
'node' => array(
'type' => 'INNER',
'table' => 'node_galleries',
'left_field' => 'nid',
'field' => 'gid',
),
);
$data['node_galleries_gallery']['gid'] = array(
'title' => t('Gallery ID'),
'help' => t('The GID of the gallery'),
'field' => array(
'handler' => 'node_gallery_handler_field_gid',
),
'argument' => array(
'handler' => 'views_handler_argument_node_nid',
'parent' => 'views_handler_argument_numeric', // make sure parent is included
'name field' => 'title', // the field to display in the summary.
'numeric' => TRUE,
'validate type' => 'nid',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);?>
Что нужно в нем поправить?