In views,the default "title" field has an option "Link this field to the original piece of content " so that it links to the original node but it is not present for other fields.How to link these to original node?
A list of fields is being displayed but they are not linked to their respective nodes.
Are there any replacement patterns that can be used in the "rewrite results > Output this field as a link " ?
Or is there any other way?

Comments

I have seen such check box in some fields but not sure about that.

The answer is, yes, you will have to use "output this field as a link"(Try to avoid field rewriting for URLs because you will face many troubles if you move your site's domains or subfodlers.).
In Views fields, load the Node:link and setup options to get it as plain text. i.e. without linking to the node with an A tag. Check "exclude the field from display" option in that field's options.

Then you can add this "node:link" as the target of the other CCK field.

// Ayesh

Try to avoid field rewriting for URLs because you will face many troubles if you move your site's domains or subfodlers.

Sorry... but this makes no sense. Regardless of which option you choose, you will always have link problems if you use anything but root relative urls and then change the domain. Likewise, if you will always have invalid links if you use subdirectories and then change them at some point. It doesn't matter which option you use. From what I can see, the link option is just a bit of a shortcut or convenience for those that don't know the full syntax of the anchor tag.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Ah, yes...
I was crazy. both custom rewriting and "output as a link" option give troubles unless we use relative paths or PHP base paths to get the base domain(useful fur Feeds, etc).
Sorry for my bad reply.

// Ayesh

Yup,got that.But used content:path instead of content:link in drupal 7.

Cannot set content:link as plain text.In Drupal 7 content:link returns an anchor tag.Replacement patterns also returns the whole anchor tag.

Drupal 7: Using the content:path method mentioned above, i still have an issue:
trying to get a non-title field linked to its node mydomain.com/foo/bar
This is what i did:

Placed content:path before the field X
Field X - Rewrite results - Output this field as link - Link path: [path]
The result was:
- path: /bar/foo (left it unhidden to check output)
- field X links to: foo/bar Page not found, because it is not converted to the full url mydomain.com/foo/bar.

Then i ticked "Use absolute path" in the same field X rewrite settings, which resulted in the field X linking to mydomain.com//foo/bar
Although that displays the correct page to the node content, that double slash should be one slash.

How did you guys accomplish this?

Late as this reply may be...hoping that it helps someone else with the same issue.

1. Place content:path before the field X. Check "Exclude from Display". Expand "Rewrite results" and only check "Use absolute link" for this field.
2. Field X - Rewrite results - Output this field as Link - Link path: [path] . Do NOT check "Use absolute path" here again.

Dilip
home on the web: http://www.dilipfrancis.com/
drupal tidbits: http://www.drupaldrive.com/

I'm new with this level of views usage. My problem is how to use the real syntax of links (or tokens)
You said to use [path] (I understand this is the theory) this takes me to the first listed views page (one I created before). If I want to send the user to a concrete page, what would be the syntax or procedure? Can you at least point me in the right direction?

Thanks a lot (i've been some hours trying to accomplish this :P)

PIÑA&POLLO

On Drupal 7 I do it in this way:
- add the field you want
- add the field "Content: Link"
- in the "Content: Link" settings in "Rewrite results" active "rewrite" and use the token of your first field. The token is something like "[field_yourfieldname]" but you can see under the replacement pattern.

It's important than your link field is after the other field.

Great tip, thanks. A correction: instead "Content: Link" you must add "Node: Link" in D7. And you may want set "Exclude from display" in the field you want settings. An example is to display a body content in a teaser, linking to its node (like "Link this field to the original piece of content" in Content:Title settings).

I've confused myself many times with this too! Here's the procedure:

Assuming you wish to turn Field_X into a link, the fields must be listed as follows:

Field_X (should click exclude from display)
Content: Link

What you do with the content link is "Rewrite Display" and simply put in the token for [content_Field_X]

Content:path works better than Content:link for two reasons

Instead of using Content:Link for each field that should link to the node, Content:path just needs to be defined once above all other fields. Any field can then reuse this as needed based off this step:
http://drupal.org/node/1234862#comment-5654484

Also, the hidden field to be re-used by other fields should be the link/path field and not the Field_X field.

Dilip
home on the web: http://www.dilipfrancis.com/
drupal tidbits: http://www.drupaldrive.com/

For anyone who comes here looking for a way to get just the path to the full node:

1) Install View Path http://drupal.org/project/views_php
2) Add a Global PHP field
3) In the Value Code box put

return 'node/' . $data->nid;

4) In the Output Code box put

<?php
echo "URL to this content is:<br />" . url($value, array('absolute' => TRUE));
?>

This works for D7 / Views 3.

wowsa... installing views_php just for this (if it's installed already for other reasons that's different), which can be done with views alone, is like hammering a nail with a jack hammer.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

It's installed for other reasons but how do you do this with views alone?

Can somebody tell me how to get the origanal piece of content displayed in a view?
I created a block (ticker) that shows titles that link to the original piece of content. But i want this to be displayed in a page that I created in the same view that is used for the block (or should I create a new view?).
O and in this page only the content of the link being clicked should be displayed.

I think this thread is the most relevant to submit my comment..

thanks in advance.

'nide references, user reference, parent node(of a comment) , voting results, node's author and many of the connected content can be shown in the View if you include them in the View.
Add a "Relationship" to the referenced node via the fields in your current view.
It's a little difficult to explain it here. But what you need is Relationships. It's well documented in views docs.

// Ayesh

Sorry but I don't understand why you are mentioning this:

'nide references, user reference, parent node(of a comment) , voting results, node's author and many of the connected content can be shown in the View if you include them in the View.

I have multiple links in a block (created with views) and I want the content (when clicking the link) to be displayed on a page (created with same view) and only the content that the clicked link refers to.

I will look into Relationships but I think I need the page view to use a value (from the link? or nid?) to filter. So I have been struggeling with contextual filters for a while now with no luck at all.

Thanks for your reply

Summary:

This worked for me:
To link field_X to full node, do the following:

1. Place content:path before the field_X.
- Check "Exclude from Display".
- Expand "Rewrite results" and only check "Use absolute link" for this field.

2. Field X - Rewrite results
- Output this field as [path] . Do NOT check "Use absolute path" here again.

http://drupal.org/node/1234862#comment-5654484

Katy Laan
SeascapeWebDesign.com
Twitter.com/seascapeweb

Hi all,

I know this post is a bit older, but if anyone is interested, there are two tutorials that I wrote around this topic:

Linking fields to external links

Linking fields to its content (with the path-field)

I hope that helps.

Cheers

Thanks Katja - very useful tutorial.

Just one thing i found on my multi-lingual site in Drupal 7.
I needed to add http://www.example.com to get what I needed in front of [path] in order to get a path that worked like http://www.example.com/en/content/my-page.
so it looks like this http://www.example.com[path]
Without that I got this: http://www.example.com//en/content/my-page. The 2 "//" in front of "en" showed up and rendered the path unusable.
May be I missed something else ..... for now it works ...

-----------
Good luck .....
... more recent results of trying Drupal just once are -
www.native-power.de

i had the same problem on multilingual site,

what i found out is that writing in the

Output this field as a link

node/!1 will automatically convert it to the right path.

Great, works like a charm, thanks