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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:04:09
Script start
Timing: Jan 18 2025 16:04:09
Module start 'layout'
Timing: Jan 18 2025 16:04:09
Module start 'content'
Timing: Jan 18 2025 16:04:10
Module end 'content'
Timing: Jan 18 2025 16:04:10
Script end

Main resources:

Total runtime0.9137 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 589.5313152.6875
Module start 'layout' 0.00520.0031 742.218839.5547
Module start 'content' 0.00830.9021 781.7734519.1406
Module end 'content' 0.91030.0033 1,300.914112.0625
Script end 0.9136  1,312.9766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4409160.0003
Check MTime0.00190.2061160.0001
Mysql Total
Database connection0.00100.114210.0010
Mysqli_queries0.851093.1398570.0149
Looping result0.00060.0611550.0000
Template Total0.879096.220.4395
Template load0.00240.266020.0012
Template processing0.876695.937920.4383
Template load and register function0.00010.014210.0001
states
state_id_array0.00100.114510.0010
state_identifier_array0.00260.289420.0013
Override
Cache load0.00190.2126520.0000
Sytem overhead
Fetch class attribute can translate value0.00090.096520.0004
Fetch class attribute name0.00100.113940.0003
XML
Image XML parsing0.00070.079020.0004
class_abstraction
Instantiating content class attribute0.00000.001350.0000
General
dbfile0.00130.1451160.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs