Monday 20 June 2005 3:12:01 pm
Hi, you can try that:
{let attribute=$currentDocument.data_map.file}
<a href={concat( 'content/download/', $attribute.contentobject_id, '/', $attribute.id, '/file/', $attribute.content.original_filename|urlencode )|ezurl}>{$attribute.content.original_filename|wash( xhtml )}</a>
{/let}
Or just use the attribute_view_gui:
{attribute_view_gui attribute=$currentDocument.data_map.file}
The attribute_view_gui will use the template you can find at /design/standard/templates/content/datatype/view/ezbinaryfile.tpl (as long you have not copied this template into another design or make use of an override-template). Of course, if the attribute is of an other datatype the accordant template will be used. I would prefer the attribute_view_gui over the first suggestion I made and use an override-template if I need an other output than the default one.
@Leonardo: If you need to have the $node variable avalible in pagelayout (or an other place outside $module_result.content), you can place this code on the top of your pagelayout.tpl:
{default
pagelayout_node=fetch(content,node,hash(node_id,$module_result.node_id))
}
(...rest of the pagelayout.tpl...)
{/default}
Don't forget to close "default" again... In $pagelayout_node will than be the same as in $node that is avalible in $module_result.content.
Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________
|