Forums / Setup & design / image path

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

eZ debug

Timing: Jan 18 2025 11:11:20
Script start
Timing: Jan 18 2025 11:11:20
Module start 'content'
Timing: Jan 18 2025 11:11:21
Module end 'content'
Timing: Jan 18 2025 11:11:21
Script end

Main resources:

Total runtime1.0427 sec
Peak memory usage4,096.0000 KB
Database Queries206

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 587.5391180.8516
Module start 'content' 0.00650.9135 768.3906537.5078
Module end 'content' 0.92000.1226 1,305.8984337.8125
Script end 1.0426  1,643.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3974210.0002
Check MTime0.00160.1538210.0001
Mysql Total
Database connection0.00070.063310.0007
Mysqli_queries0.959392.00162060.0047
Looping result0.00180.17072040.0000
Template Total1.002196.120.5010
Template load0.00210.198420.0010
Template processing1.000095.905120.5000
Template load and register function0.00010.011510.0001
states
state_id_array0.00200.191310.0020
state_identifier_array0.00250.237820.0012
Override
Cache load0.00180.1748640.0000
Sytem overhead
Fetch class attribute can translate value0.00200.189030.0007
Fetch class attribute name0.00110.105970.0002
XML
Image XML parsing0.00050.047930.0002
class_abstraction
Instantiating content class attribute0.00000.001470.0000
General
dbfile0.00560.5328210.0003
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
21content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
15content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 52
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs