how to get path for specific flash file

Author Message

John Mina

Monday 30 July 2007 3:25:05 pm

Hello
I have a banner that i will be showing in the top of the website.
I uploaded the flash file in the media section as a a flash file

I used the following code to show the file

{def $n=fetch(content,node,hash(node_id,181))}
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="730" height="168">
						<param name="movie" value={$n.data_map.file.content.filepath|ezroot}>
						<param name="quality" value="High">
						<embed src={$n.data_map.file.content.filepath|ezroot} pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="730" height="168"></object>


	{/def}

NOTE THE PART : {$n.data_map.file.content.filepath|ezroot}

This returns the path to the file that is stored in the var folder. but the file is still not shown

how would i help it ?

NOTE: i am trying to build using version 3.9.2

Thanks
john

Bruce Morrison

Monday 30 July 2007 4:42:35 pm

Hi John

Try

...
{def $n=fetch(content,node,hash(node_id,181))}
{def $attribute=$n.object.data_map.file}
...
<param name="movie" value={concat("content/download/",$attribute.contentobject_id,"/",$attribute.content.contentobject_attribute_id,"/",$attribute.content.original_filename)|ezurl} />
...

If you still have trouble can you post the resulting HTML so we can see if there are any clues there.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

John Mina

Tuesday 31 July 2007 12:10:46 am

hello Bruce,
this Code is smart thanks :)
I used it in the embed and the < param movie part

and tit works now perfect as it should be
Thanks again ,
all the best

If you have any further tips on how do some one can think of making that code to construct and use it in future, let me know plz
thanks
John

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:00:26
Script start
Timing: Jan 18 2025 16:00:26
Module start 'layout'
Timing: Jan 18 2025 16:00:26
Module start 'content'
Timing: Jan 18 2025 16:00:27
Module end 'content'
Timing: Jan 18 2025 16:00:27
Script end

Main resources:

Total runtime0.7743 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.0059 589.4609152.6406
Module start 'layout' 0.00590.0035 742.101639.4766
Module start 'content' 0.00940.7632 781.5781539.8281
Module end 'content' 0.77260.0016 1,321.406312.1406
Script end 0.7742  1,333.5469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4384160.0002
Check MTime0.00140.1813160.0001
Mysql Total
Database connection0.00100.127610.0010
Mysqli_queries0.717492.6561570.0126
Looping result0.00060.0806550.0000
Template Total0.744996.220.3724
Template load0.00240.310620.0012
Template processing0.742495.885220.3712
Template load and register function0.00020.028910.0002
states
state_id_array0.00080.097510.0008
state_identifier_array0.00110.139020.0005
Override
Cache load0.00200.2593320.0001
Sytem overhead
Fetch class attribute can translate value0.00100.127220.0005
Fetch class attribute name0.00120.152840.0003
XML
Image XML parsing0.00070.096520.0004
class_abstraction
Instantiating content class attribute0.00000.001440.0000
General
dbfile0.00170.2145160.0001
String conversion0.00000.001440.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs