image path

Author Message

Valentina Ferrari

Wednesday 19 May 2004 1:31:15 am

Hi!

I'm trying to use an image in a input type="image".

I try to use this string:

<input type='image' name='xxx' value='yyy' src={attribute_view_gui attribute=$Child:item.object.data_map.thumbnail01}>

but it doesn't work because in this way I'm showing not only the image path but also the tage <img...>.

Well, do you know the way to show only the image path?

Thanks in advance
Valentina

Guglielmo Celata

Wednesday 19 May 2004 2:35:42 am

Ciao Valentina,
the code below is working fine, for me:

 <input name="SearchButton" type="image" value="Vai!" 
        src={"doSearch.gif"|ezimage} alt="" />

hope it helps!

Guglielmo

Valentina Ferrari

Wednesday 19 May 2004 2:49:11 am

Thanks Guglielmo,
but the image I want to show is a variable, it isn't a static image.

Thanks for your reply,
Valentina

Guglielmo Celata

Wednesday 19 May 2004 6:00:29 am

Hi Valentina,
it's a weird thing this thing that you want to do.

Really, there's no such thing as a unique path for a dynamic image.
You have images stored in the var/ directory on the file system, and the real path depends from the image class that you choose.
If you want a small image, or a thumb, then the path will be different.

Anyway, supposing you want the path of the thumb, what you need is:

 <input type='image' name='xxx' value='yyy' 
        src={$Child:item.object.data_map.thumbnail01.content.thumb.url}>

Of course, you'll change thumb into whatever you like
(small, medium, or something else, if you have defined it)

By the way, you can always have fun by looking at

 {$Child:item.object.data_map.thumbnail01|attribute(show)}

which will show you a certain amount of info.

Ciao,
Guglielmo

Valentina Ferrari

Wednesday 19 May 2004 6:39:55 am

Hi Guglielmo,
thanks a lot for your suggest.

I think is impossible to do what I want, infact this string

{$Child:item.object.data_map.thumbnail01|attribute(show)}

doesn't show info about the image path.
I think if an attribute of a class is type image, there nothing to do for show only the path without the tags (<img src=...>).

Thank you very much,
Valentina

Guglielmo Celata

Wednesday 19 May 2004 9:36:04 am

No, there's nothing really impossible with eZ.
Your request is only unusual.

Try

{$Child:item.object.data_map.thumbnail01.content|attribute(show)}

you should see some path info now.
Let me know.

Guglielmo

Valentina Ferrari

Thursday 20 May 2004 12:20:05 am

THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS

:O) :O) :O) :O) :O) :O) :O) :O) :O) :O) :O) :O)

It works!!!!!!
I'm using this string:

<input type="image" value="xxx" name="yyy" src="/{$Child:item.object.data_map.thumbnail01.content.small.full_path}">

and finally I'm watching my image.

Thanks a lot Guglielmo!
Kisses
Valentina

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 31 2025 01:31:47
Script start
Timing: Jan 31 2025 01:31:47
Module start 'layout'
Timing: Jan 31 2025 01:31:47
Module start 'content'
Timing: Jan 31 2025 01:31:47
Module end 'content'
Timing: Jan 31 2025 01:31:47
Script end

Main resources:

Total runtime0.0271 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 588.0078151.1953
Module start 'layout' 0.00670.0044 739.2031220.6406
Module start 'content' 0.01110.0142 959.84381,001.7734
Module end 'content' 0.02540.0017 1,961.617237.9922
Script end 0.0270  1,999.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003613.4067140.0003
Check MTime0.00124.5194140.0001
Mysql Total
Database connection0.00083.137210.0008
Mysqli_queries0.003111.631630.0010
Looping result0.00000.148010.0000
Template Total0.00114.210.0011
Template load0.00093.389110.0009
Template processing0.00020.835210.0002
Override
Cache load0.00072.553110.0007
General
dbfile0.00031.159480.0000
String conversion0.00000.032640.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