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.