Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[SOLVED] Vimeo iframe in a custom field not working
Wondering about this error I am getting. Placing a Vimeo embed code in an article’s body or excerpt fields works just fine, but not if I place the embed code in a custom field.
<txp:body />
<txp:if_custom_field name="content_type" value="video">
<div class="flex-video <txp:custom_field name="Video_meta" />">
<p><txp:custom_field name="Video_embed" /></p>
</div><!-- end flex-video -->
</txp:if_custom_field>
Safari inspector sees the output as a text node rather than an element, and the iframe in enclosed in ""
quotation marks.
Anyone know of a solution to this?
Offline
Re: [SOLVED] Vimeo iframe in a custom field not working
Note that with the above I’m using glz_custom_fields. Output for the video is:
<iframe src="http://player.vimeo.com/video/36954078?badge=0" width="800" height="450" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> <p><a href="http://vimeo.com/36954078">Kom deg opp, Musikkvideo</a> from <a href="http://vimeo.com/user1041278">Solborg folkeh&oslash;gskole</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
The quotations ""
don’t seem to be getting parsed.
Last edited by jstubbs (2012-12-07 03:57:20)
Offline
Re: [SOLVED] Vimeo iframe in a custom field not working
maybe it will work if you add an escape attribute in the tag?
<p><txp:custom_field name="Video_embed" escape="" /></p>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] Vimeo iframe in a custom field not working
Wow, learn something new every day. I didn’t know about the escape
attribute for the custom_field tag. Solved! Thanks Yiannis!
Offline