Download Image

Author Message

Daniele Cacace

Wednesday 25 May 2005 3:14:16 am

In Image template i want insert a link to download image in original size! Is It possible?
es:
TITLE
<-- GALLERY -->
|-------------|
|-------------|
|----IMAGE----|
|-------------|
|-------------|
LINK DOWNLOAD

Łukasz Serwatka

Wednesday 25 May 2005 3:24:46 am

Yes, only what you need is full image url.

<a href={$node.object.data_map.image.content['original'].url|ezroot} target="_blank">{$node.name}</a>

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

Daniele Cacace

Wednesday 25 May 2005 3:30:44 am

it open about:blank

:|

Łukasz Serwatka

Wednesday 25 May 2005 3:36:10 am

Hmm, make sure that "image" is name of your attribute id (Image datatype) in your class.

What is the output?

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

Daniele Cacace

Wednesday 25 May 2005 3:36:28 am

if I make to print {$node.object.data_map.image.content['original'].url|ezroot} to video I read:
""

:| :|

Łukasz Serwatka

Wednesday 25 May 2005 3:42:33 am

so, try with

{$node.data_map.YOUR_IMG_ATTRIBUTE.content[original].url|ezroot}

both works

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

Daniele Cacace

Wednesday 25 May 2005 3:46:47 am

Sorry my error, i write {$node.object.data_map.content['original'].url|ezroot}
:(
I have modified the code ({$node.object.data_map.image.content['original'].url|ezroot}) but they give this error to me:

Fatal error: eZ publish did not finish its request

The execution of eZ publish was abruptly ended, the debug output is present below.

Daniele Cacace

Wednesday 25 May 2005 3:48:14 am

P.S. the class is "image" and template is standard template "image_full"

Łukasz Serwatka

Wednesday 25 May 2005 3:49:32 am

What happend when you use this code?

{$node.data_map.image.content[original].url|ezroot}

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

Daniele Cacace

Wednesday 25 May 2005 3:51:44 am

"/var/intranet/storage/images/alexander/gallery/alexander02/500-1-ita-IT/alexander02.jpg" 

Łukasz Serwatka

Wednesday 25 May 2005 3:53:44 am

This must work ;)

<a href={$node.data_map.image.content[original].url|ezroot} target="_blank">{$node.name}</a>

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

Daniele Cacace

Wednesday 25 May 2005 3:56:26 am

Now it works! :|:|:|

TNX ;)-

Łukasz Serwatka

Wednesday 25 May 2005 3:57:31 am

Great! ;)

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

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 06:08:02
Script start
Timing: Jan 19 2025 06:08:02
Module start 'layout'
Timing: Jan 19 2025 06:08:02
Module start 'content'
Timing: Jan 19 2025 06:08:02
Module end 'content'
Timing: Jan 19 2025 06:08:02
Script end

Main resources:

Total runtime0.0161 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.0064 592.2109152.6094
Module start 'layout' 0.00640.0026 744.820339.4297
Module start 'content' 0.00900.0054 784.2500105.4141
Module end 'content' 0.01430.0017 889.664146.3047
Script end 0.0161  935.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002515.4582140.0002
Check MTime0.00106.3474140.0001
Mysql Total
Database connection0.00127.224110.0012
Mysqli_queries0.002515.770730.0008
Looping result0.00000.074010.0000
Template Total0.00159.010.0015
Template load0.00084.802710.0008
Template processing0.00074.174810.0007
Override
Cache load0.00063.535010.0006
General
dbfile0.00127.640280.0002
String conversion0.00000.044440.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