Forums / Developer / Universal link text to various pdf files ?

Universal link text to various pdf files ?

Author Message

Helle Andersen

Monday 30 January 2006 7:23:30 am

I have a class with a binary file attribute used for pdf files.
eZ by default makes the name of the pdf file the name of the link - insted I would rather have a specific link text (eg. "Full publication list") for all the different pdf objects, regardless of the names of the pdf files.

We tried, based on another template (publikationer_pdf is the identifier of the attribute)

{section show=$node.object.data_map.publikationer_pdf.content}
<a href={concat("content/download/",
                        $node.object.id,
                        "/",
                        $node.object.data_map.publikationer_pdf.content.contentobject_attribute_id,
                        "/file/",
                        $pdf_link.attribute.data_map.file.content.original_filename)|ezurl}>Full publication list</a> (pdf)
<br /><br />
{/section}

This actually works, but debug report (of course) that pdf-link is not defined, but I have not been able to find a substitute - if removed eZ reports
Unknown template variable 'attribute' in namespace ''

But is there not an easier way to do this ?