I want to create a simple field that displays the current URL as a link.
Could you please tell me how to do this?
Not a stupid question. Actually, you better know nothing about PHP and Views customfield to make this one working.
It is a Swiss Army knife, yes, but you have to take the blade in hand and cut with the handle.
This is how you can create a url with this field:
In the Computed code area:
// Create variable for data you want to get from the node's other field : you won't get anything if you try to insert them directly$field_a= $node->field_a['value'];$field_b= $node->field_b['value'];$node_field['value'] =// create your url at will without "http://"// they will include free text as well as values from the node'some text'.$node->nid // YES, this one will work!!!.$field_a."some other text".$field_a// and so on:;
$display = l('www.see.asso.fr/A','http://'.$node_field_item['value']);
I am on D6, but this might apply to D7 as well
Drupal is a registered trademark of Dries Buytaert.