Using template to configure link from a field
Posted by akanik on June 27, 2011 at 6:14pm
So this may be a silly, simple question... but it has me. I am trying to modify a field to be output as a link. Scenario: the user adds his/her personal website address (akanik.com) in to the "Website" field. The template takes that field, enters the value of it into the a href and therefore makes the original field data (akanik.com) clickable.
<?php
print render($content['field_email']);
?>
<a href="http://<?php
print ($content['field_website']);
?>
"><?php
print render($content['field_website']);
?>
</a>
Read more