tags:

views:

628

answers:

3

Getting started with Drupal (specifically CCK and Views), so forgive me if this is a basic question.

I'm have some fairly complicated Views that display some Custom Content types with an Attachment below so that I'm essentially seeing multiple tables joined together in one view.

Let's say these pages are accessible via /person/64, where person is the view name and 64 is the node id.

In various parts of this view I'm displaying Node fields, which when clicked on take you directly to it's node.

This is what I don't want to happen. Instead I want a Node link to take you to a corresponding view. So instead of /node/128, I'd like to rewrite that as /event/128.

I tried creating a custom link in the view, but the right parameter isn't available to me. The best I can do is write the link as /event/EventTitle but that doesn't work with the way inheriting arguments in my Attachment.

What's a clean way to do this?

A: 

Try adding the Node ID as one of your fields and checking the 'Exclude from display' box so it doesn't turn up in the output.

Then on the configuration for the Node Title field check 'Rewrite the output of this field'. If you have the Token module installed, the Node ID will turn up as a token which you can inject into your custom link.

kidrobot
well this isn't quite right because it will return the Node ID of the current node. I need the Node ID of the referenced node.
AK
It will not return the node ID of the page you are on, but the node ID corresponding to your event title eg. 128 for that item in the view. If the 128 is the ID of a referenced node then you would need to set up a relationship so you could choose that as the node ID. Got an export of your view? :)
kidrobot
ah there it is, i was missing the relationship. thanks!
AK
A: 
Kevin
A: 

You might also consider checking out the Views Attach project if you're interested in embedding Views data into a node. From your description I'm not sure if some of the URL trickiness came from the need to do that, in addition to displaying the target node itself.

Eaton

related questions