Where and how to rewrite the link on node title to the url of a nodereference field
| Project: | Views |
| Version: | 6.x-2.6 |
| Component: | node data |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Hi there,
I am looking to rewrite the link Views provides from a node title to the URL of another node which is referenced in a nodereference field.
I have set up a Relationship to the other node, and included the (Node) Node:Link (via reference) and the Node:Title. If I attempt to use the provided [view_node] token as the target for the link, I get the text of the (Node) Node:Link as the target, and not the node ID as I would assume. From this and #292795: How to link node reference field to current node, I am guessing that I will need to make this change in the code, rather than being able to achieve this in the UI.
I have looked at overriding views-view-field.tpl.php and also started looking at how I might be able to override views_handler_field_url class, but I have hit a brick wall in regards to how to go about this as my PHP skills are not the best.
If you could point me in the right direction (e.g. where the $output variable is generated for views-view-field.tpl.php and how to override), or explain where I have missed something obvious it would be greatly appreciated.
Also, thanks for all the time that you invest into developing Views. I know most sites would be lost without it, and I am sure that most of the time it is a thankless job.
Soli Deo gloria
Jerome

#1
As far as i understand the problem you could solve this by adding a relationship to the nodereference. After this you can add the node: title field and select the nodereference-relationship
#2
Automatically closed -- issue fixed for 2 weeks with no activity.