Custom Markup to item in views I created a view that displays my user profile picture.  I created a template for this view using 'views-view-fields--name.tpl.php.  This is the output I get.

&lt;div class="view-content"&gt;
  &lt;div class="views-row views-row-1 views-row-odd views-row-first views-row-last"&gt;
      &lt;div class="field-content profile"&gt;
        &lt;div class="user-picture"&gt;
          &lt;img typeof="foaf:Image" src="/default_profile_picture.jpg" /&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


What I want to do is add a link to my image, like so:

 ...&lt;a href="#"&gt;&lt;img&gt;&lt;/img&gt;&lt;/a&gt;...


But it keeps adding that line to just before the "user-picture" div, and I want it after it.  Is there any way to achieve this? Custom templates seems to not do the trick.
You can do this in the views ui.


Create a custom field
Hide the display of the image field
Use tokens provided to add image field output to your custom field


Example:

&lt;a href="#"&gt;[image_field]&lt;/a&gt;


UPDATE

Also ensure the style options are set to none on the image field so you don't get any div wrappers.