How to display file name and url

Author Message

Seravi Leonart

Tuesday 19 April 2005 5:40:23 pm

Say I have these binary files

After fetching them,
How can I display a link directly to the file with the name of the file as the link?

<a href="??? - file url">Filename????</a>

Eirik Alfstad Johansen

Wednesday 20 April 2005 1:15:06 am

Hi Seravi,

Do

{$node.data_map.binary_attribute_identificator|attribute(show)}

to see where you can find the data you need.

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Seravi Leonart

Wednesday 20 April 2005 3:37:43 pm

Hi,

I tried but seemed like the only thing I'm getting here is this line:

Attribute Type Value

Eirik Alfstad Johansen

Thursday 21 April 2005 12:22:58 am

Hi Seravi,

Then you're not doing it right. :)

Have you replaced "binary_attribute_identificator" with the actual identificator of your binary attribute?

You could also try {$node.data_map|attribute(show)} in order to find out what it is.

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Ɓukasz Serwatka

Thursday 21 April 2005 12:24:15 am

Code example is in ezbinaryfile.tpl

All data types templates are located in folder:
design/standard/templates/content/datatype/view

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Seravi Leonart

Thursday 21 April 2005 8:22:11 am

Thanks,

I got it now

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 18 2025 22:38:07
Script start
Timing: Jan 18 2025 22:38:07
Module start 'layout'
Timing: Jan 18 2025 22:38:07
Module start 'content'
Timing: Jan 18 2025 22:38:07
Module end 'content'
Timing: Jan 18 2025 22:38:07
Script end

Main resources:

Total runtime0.0198 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.3516152.6250
Module start 'layout' 0.00590.0052 741.976639.4453
Module start 'content' 0.01110.0065 781.421993.4609
Module end 'content' 0.01770.0021 874.882834.3047
Script end 0.0198  909.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002814.2127140.0002
Check MTime0.00146.8731140.0001
Mysql Total
Database connection0.00063.232110.0006
Mysqli_queries0.003819.123430.0013
Looping result0.00000.095010.0000
Template Total0.00168.310.0016
Template load0.00094.741210.0009
Template processing0.00073.541210.0007
Override
Cache load0.00073.393310.0007
General
dbfile0.00031.305880.0000
String conversion0.00020.817740.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