<a>

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
akanik's picture

Using template to configure link from a field

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[&#039;field_website&#039;]);
?>
">
<?php
print render($content[&#039;field_website&#039;]);
?>
</a>
Read more
Subscribe with RSS Syndicate content