Domanda

I would like add youtube video in my "xml_bloc" here my code

[CustomTagSettings]
AvailableCustomTags[]=youtube
IsInline[youtube]=true

The news tags "youtube is visible in my back office. Here the template content "youtube.tpl"

<div class="video">
    <object width="{$width}" height="{$height}" type="application/x-shockwave-flash" data="{$content}">
        <param name="movie" value="{$content}"></param>
        <param name="allowfullscreen" value="true"></param>
    </object>
</div>


My question is where i save my template templates/content/view/datatype/ezxmltags/youtube.tpl ?

Thank you in advance for your help.

È stato utile?

Soluzione

Looks like you didn't share all your content.ini code, like where you declare your variables, but I am assuming you have that part right. It also looks like your location is correct.

extension/<your_extension>/design/ezflow/templates/content/datatype/view/ezxmltags/youtube.tpl

Are you experiencing problems with the custom tag? Did you remember to clear the cache?

Altri suggerimenti

it's works, i have try this code

[CustomTagSettings]
AvailableCustomTags[]=youtube
CustomTagsDescription[youtube]=YouTube video

[youtube]
CustomAttributes[]=video_id
CustomAttributes[]=width
CustomAttributes[]=height


<div class="object-center">
    <object type="application/x-shockwave-flash" width="{$width|wash}" height="{$height|wash}" data="http://www.youtube.com/v/{$video_id|wash}&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x666666&amp;color2=0xf15e22">
        <param name="movie" value="http://www.youtube.com/v/{$video_id|wash}&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x666666&amp;color2=0xf15e22" />
    </object>
</div>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top