Forums / Setup & design / 3.1.0.2 -> Problem to override the embed.tpl to display a Flash file. Strange result.

3.1.0.2 -> Problem to override the embed.tpl to display a Flash file. Strange result.

Author Message

laurent le cadet

Tuesday 24 June 2003 3:13:25 am

Hi,

I create a class

In override.ini.append

[embed_media]
Source=content/view/embed.tpl
MatchFile=embed_media.tpl
Subdir=templates
Match[class]=14

The embed_media.tpl is a copy of the ezmedia.tpl
The class "14" belong to class group media and it show flash files.
It is in override/templates/embed_media.tpl

I have this in my page :

<div class="block">
<!-- including template design/standard/templates/content/datatype/view/ezxmltext.tpl -->
<p class="small">design/standard/templates/content/datatype/view/ezxmltext.tpl</p><br/>
<!-- including template design/standard/templates/content/datatype/view/ezxmltags/object.tpl -->
<p class="small">design/standard/templates/content/datatype/view/ezxmltags/object.tpl</p><br/><!-- including template design/demo/override/templates/embed_media.tpl -->
<p class="small">design/demo/override/templates/embed_media.tpl</p><br/>
</div>

!:(

The template has been find but I don't see what I want to. (nothing...)

Someone for help ?

Paul Forsyth

Tuesday 24 June 2003 12:02:46 pm

I assume your class 14 is new. If so you may need to give your anonymous user access to it through user/roles functionality.

laurent le cadet

Tuesday 24 June 2003 11:47:44 pm

Thanks.
It works better now. But I still have a problem in printing the content.
I just see a lik and when I click on it it just display the name and the description but not the flash file itself.

Here's the template embed_media.tpl :

{switch name=mediaType match=$attribute.contentclass_attribute.data_text1}
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="{$attribute.content.width}" height="{$attribute.content.height}">
<param name="movie" value={concat("content/download/",$attribute.contentobject_id,"/",$attribute.content.contentobject_attribute_id,"/",$attribute.content.original_filename)|ezurl} />
<param name="quality" value="{$attribute.content.quality}" />
<param name="play" value="{section show=$attribute.content.is_autoplay}true{/section}" />
<param name="loop" value="{section show=$attribute.content.is_loop}true{/section}" />
<embed src={concat("content/download/",$attribute.contentobject_id,"/",$attribute.content.contentobject_attribute_id,"/",$attribute.content.original_filename)|ezurl}
quality="{$attribute.content.quality}" pluginspage="{$attribute.content.pluginspage}"
width="{$attribute.content.width}" height="{$attribute.content.height}" play="{section show=$attribute.content.is_autoplay}true{/section}"
loop="{section show=$attribute.content.is_loop}true{/section}" >
</embed>
</object>
{/switch}

It's on the page, but the file is display with another one :
design/standard/templates/node/view/line.tpl

{default node_name=$node.name}<img src={"class_2.png"|ezimage} border="0" alt="{'Document'|i18n('design/standard/node/view')}" /> <a href={concat('content/view/full/',$node.node_id)|ezurl}>{$node_name|wash}</a>{/default}

I don't understand how it works together.