Wednesday 28 July 2004 3:17:39 am
Hello erveryone,
we have some problems with creating a direct link to a binary file.
The PDF-files we want to offer for download a stored in a certain folder with the node id 296. From an override-template of another folder in the tree-hierarchy we can grab the content of node 296 with the following code
{* Fetch everything that is under node #296 (children, grand-children, etc.) *}
{let nodes=fetch( 'content', 'tree', hash( 'parent_node_id', 296 ) ) }
{* Loop through the nodes and display their names. *}
{section loop=$nodes}
<br />
<a href={concat("/content/view/full/",$:item.node_id)|ezurl}>{$:item.data_map.titel.data_text}</a>
<br />
{$:item.data_map.beschreibung.data_text}
<br />
{$:item.data_map.binaer.data_???}
<br />
We can display the attributes title (identifier="titel") and description (identifier="beschreibung") but we can not display the actual file directly (identifier="binaer"), because we do not know the data_map. For the title and the description it is "data_text". We also used data_int before, to display numbers. Which data_map can we use to display the file? When you click on the link that we generated with the code above, the file plus the filsize is displayed directly by the ezbinaryfile.tpl, that is used there. We want exactly that, but copying the ezbinaryfile.tpl in our override template does not work.
http://www.heiringhoff.de
|