Hello
There is a problem, look forward to your help:).
There is a site http://www.ukraineworld.com.ua/en. It has a directory of nodes http://www.ukraineworld.com.ua/en/countries.
They cite a field tour through CCK Reference, for example http://www.ukraineworld.com.ua/en/node/15
The home page displays the last added tours with views 2. It displays the name of the tour, tizer and country icon, created through the image attach and inserted through the relationships of country's node, referred to by the tour.
The problem is that the icon should theoretically link to Node country from which it is inserted, but it refers to the tour itself, to which it is attached in this view.
The question - how can i change the default image attach link in this view, so it can link to node from which it was inserted.
Here is the code
SELECT DISTINCT(node.nid) AS nid,
node_node_data_field_countries__image_attach.iid AS node_node_data_field_countries__image_attach_iid,
node.title AS node_title,
node_revisions.teaser AS node_revisions_teaser,
node_revisions.format AS node_revisions_format
FROM node node
LEFT JOIN content_field_countries node_data_field_countries ON node.vid = node_data_field_countries.vid AND node_data_field_countries.delta = 0
INNER JOIN node node_node_data_field_countries ON node_data_field_countries.field_countries_nid = node_node_data_field_countries.nid
LEFT JOIN image_attach node_node_data_field_countries__image_attach ON node_node_data_field_countries.nid = node_node_data_field_countries__image_attach.nid
LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
WHERE (node.type in ('tour')) AND (node.language in ('***CURRENT_LANGUAGE***'))
Thanx!
Comments
Comment #1
dawehneryou could rewrite the field as link, per view gui, or by theming.
But i think thats more a support request for image attach.
Comment #2
esmerel commentedNo response to suggested fix