Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I want to create a simple field that displays the current URL as a link.
Could you please tell me how to do this?
Thank you!
Comments
Comment #1
jvieille CreditAttribution: jvieille commentedNot 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:
In the display code area
$display = l('www.see.asso.fr/A','http://'.$node_field_item['value']);
In the field display setting, keep "Raw text"
I am on D6, but this might apply to D7 as well