Forums / Setup & design / print out flashfile url inside of templates

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

print out flashfile url inside of templates

Author Message

nicholas king

Thursday 26 August 2010 2:27:33 am

Hello all,

i am still wrestling with the template code and am now trying a way to stick a url to a flash file inside of a template

so far i have this

{let videos = fetch('content','tree',
hash(
'parent_node_id',335,
'class_filter_type','include',
'class_filter_array',array('flash'),
'limit',1,
'sort_by',array('published', false())))}
{foreach $videos as $video}
{$video.url}
{$video.file}
{$video.object.data_map.flash_video.content.file}
{$video.data_map.flash.file}
{/foreach}

and none of these work.

Any ideas.

Thanks

Nicholas

Thiago Campos Viana

Thursday 26 August 2010 6:54:46 am

You can debug your template variable with attribute operator, here's a sample:

{videos|attribute( show, 1 )}

or

{foreach $videos as $video}
    {video|attribute( show, 1 )}
{/foreach}

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

nicholas king

Thursday 26 August 2010 8:25:56 am

Thanks for your reply Thiago Campos Viana,

I have just used the function and its fantastic and has solved a load of other problems we have had.

just for the reference its correct usage is

{$video|attribute(show,1)}

Jérôme Vieilledent

Friday 27 August 2010 8:09:09 am

You might want to use attribute_view_gui template function :

{attribute_view_gui attribute=$video.data_map.flash_video}

You can also print out raw URL this way :

{$video.data_map.flash_video.content.filepath|ezroot}