title: Wrap output with link from field in drupal views
body: <p>I have a view that is outputting a list of nodes that contain a link, image and text.</p>
  
  <p>I want to use the link field to wrap the output (rather than link to the node), but I can't figure out how to get the raw url/title etc to create create that link in the template.</p>
  
  <p>The field is configured to output the url as plain text, but is wrapped in div/spans regardless of the style settings for the view field.</p>
  
  <p>views-view-fields--my-view.php:</p>
  
  <pre><code>&lt;a href="&lt;?php echo $fields['field_link']-&gt;content ?&gt;"&gt;
  &lt;?php foreach ($fields as $id =&gt; $field):
      if ($id == 'field_link') continue;
      ?&gt;
    &lt;?php if (!empty($field-&gt;separator)): ?&gt;
      &lt;?php print $field-&gt;separator; ?&gt;
    &lt;?php endif; ?&gt;
  
    &lt;?php print $field-&gt;wrapper_prefix; ?&gt;
      &lt;?php print $field-&gt;label_html; ?&gt;
      &lt;?php print $field-&gt;content; ?&gt;
    &lt;?php print $field-&gt;wrapper_suffix; ?&gt;
  &lt;?php endforeach; ?&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>This produces:</p>
  
  <pre><code>&lt;a href="&lt;div class=" data-thmr="thmr_72"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even"&gt;&lt;span data-thmr='thmr_24' class='devel-themer-wrapper'&gt;/drupal/%237digital-buy&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;"&gt;
     [...]
  &lt;/a&gt;
  </code></pre>
  
  <p>Which is obviously not what I need.</p>