I apologize if the issues queue is not the right place to post this but I couldnt find this anywhere and it took me some time to figure it out so I thought that others may find this useful. I was struggling with how to output this field as an active external link in my custom .tpl.php template. Here is how I ended up with the correct output:

print $node->field_my_fieldname[0] "> print $node->field_myfiledname[0]['view']

Hope that helps someone else.

Comments

sammyframson’s picture

PS, that was one string of code and the " rel="nofollow" was added by the system... Perhaps that's why i wasnt able to find my answer in the first place...

Start with an href and include the php for the field and then the link is the 'view' of that field:

e.g.:
a href=" print $node->field_my_fieldname[0] " > print $node->field_my_fieldname[0]['view']
/a> (that is - close the tag)

renatog’s picture

Issue summary: View changes
Status: Active » Reviewed & tested by the community

Perfect @sammyframson.

Thank you very much for share your good solution. It's ways very useful. Thank you again. Gob catch

renatog’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.