How do I print the output of a field as a link on node.tpl.php? I'm able to print the raw output of a field using this:
<?php $display = array('label' => 'hidden');
$view = field_view_field('node', $node, 'field_podcast_url', $display);
print drupal_render($view);?><?php $display = array('label' => 'hidden');?>
The problem occurs when I try to make it as a link using this method:
<?php $display = array('label' => 'hidden');
$view = field_view_field('node', $node, 'field_podcast_url', $display); ?>
<a href="<?php print drupal_render($view); ?>">text</a>
The output looks like this:
and the link points to this:
http://controldaily.dev/<div class=
I've looked around at solving this issue and can't find a solution. Anything else just shows nothing.