My view contains 6 fields from a content type, and then one 'Global: Custom Text' field which I use to structure the view how I'd like. Note that I remove all styling and containing elements on the hidden view fields.
field_video_link is not using the tpl.php file I created for it only when it is used with the 'Global: Custom Text' field. If I uncheck "Exclude from display", it renders using the custom template.
The HTML, along with tokens, that is contained in the 'Global: Custom Text' field is:
<div class="grid-12"> <div class="quote-cite"> <span class="quote-cite-name">[field_first_name] [field_last_name]</span> <span class="quote-cite-title">[field_title]</span> <span class="quote-company">[title]</span> </div> <blockquote class="testimonial-quote">[body]</blockquote> </div> <div class="grid-4"> <div class="testimonial-video"> [field_video_link] </div> </div>
The following is in views-view-field--field-video-link.tpl.php ('Here' is only printed to help me confirm):
<?php $output = 'Here<iframe width="560" height="315" src="//www.youtube.com/embed/' . $output . '?rel=0" frameborder="0" allowfullscreen></iframe>'; print $output;
When I view it, I only get the raw output from my field. If I un-check "Exclude From Display" on the field in question, I get what you see in the screenshot included below. Rendered by itself, it is just fine; within the "Global: Custom Text" it is not.