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 ?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 03:24:21
Script start
Timing: Jan 19 2025 03:24:21
Module start 'layout'
Timing: Jan 19 2025 03:24:21
Module start 'content'
Timing: Jan 19 2025 03:24:21
Module end 'content'
Timing: Jan 19 2025 03:24:21
Script end

Main resources:

Total runtime0.0203 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 589.2891152.6406
Module start 'layout' 0.00690.0040 741.929739.4766
Module start 'content' 0.01090.0072 781.406385.3828
Module end 'content' 0.01810.0022 866.789130.3047
Script end 0.0203  897.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002813.8224140.0002
Check MTime0.00125.9575140.0001
Mysql Total
Database connection0.00084.138110.0008
Mysqli_queries0.004220.569630.0014
Looping result0.00000.117210.0000
Template Total0.00178.510.0017
Template load0.00094.561010.0009
Template processing0.00083.926010.0008
Override
Cache load0.00063.070710.0006
General
dbfile0.00188.615980.0002
String conversion0.00000.053940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs