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)}
|