Forums / Setup & design / embeded image: show thumbnail

embeded image: show thumbnail

Author Message

Thomas Brandl

Friday 05 September 2003 1:43:59 am

Hi,

I am trying to show the thumbnail of an image, which I added to an infopage as related object.
Therefor I overrided /content/view/embed.tpl with a template, that is supposed to display the thumbnails source (<img src...>)

However, I can not find any information within this object that points me to the thumbnails source!
According to the admin interface, the thumbnail is stored in:
/var/storage/variations/image/p/h/p/phpkBI2jg_100x100_138.jpg

This is the source I need!

I feel, it's not intended to make use of the thumnail outside the admin interface, right?

Thanks for hints!

Thomas Brandl

Friday 05 September 2003 1:53:09 am

ok,
{attribute_view_gui image_class=small attribute=$object.data_map.image}

does the trick. It's just not very intuitive for me yet..

laurent le cadet

Friday 05 September 2003 1:53:24 am

Maybe you can try :

<object id="1" size="small" />

(change 1 with your object ID)

Laurent

Thomas Brandl

Friday 05 September 2003 2:03:56 am

> <object id="1" size="small" />
> (change 1 with your object ID)

would be even better! Unfourtunately it's not working...

Is there a way to add attributes to the object tag (like size or alignment) that I can access from a template or pass to the datatype template (in this case ezimage.tpl)?

laurent le cadet

Friday 05 September 2003 2:29:47 am

did you override image.tpl with an embed_image.tpl ?

Thomas Brandl

Friday 05 September 2003 3:54:28 am

I overrided "/content/view/embed.tpl with a template, that is supposed to display the thumbnails source (<img src...)":

{default attribute_parameters=array()}
<a href={concat('content/view/full/',$object.main_node_id)|ezurl}>{attribute_view_gui attribute=$object.data_map.image}</a>
{/default}

The question is, when embedding related objects with <object id="xy" />, can I add additional attributes such as <object id="xy" myattribute="some_data" /> and access them in the template via e.g: {$object.data_map.myattribute}??

laurent le cadet

Friday 05 September 2003 4:09:56 am

I don't know if you can create extra attibutes.
really sorry.

Laurent.

Paul Borgermans

Friday 05 September 2003 5:15:37 am

You can pass attributes in the {attribute_view_gui ... myvar=myvalue}

In your template, you can access them as {$myvar}.

For <object id links> you may define a class and use this to select another template. This may also solve your problem.

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

eZ debug

Timing: Jan 18 2025 20:54:39
Script start
Timing: Jan 18 2025 20:54:39
Module start 'content'
Timing: Jan 18 2025 20:54:39
Module end 'content'
Timing: Jan 18 2025 20:54:39
Script end

Main resources:

Total runtime0.1775 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.1406180.8359
Module start 'content' 0.00620.0121 769.9766101.8672
Module end 'content' 0.01840.1591 871.8438530.8047
Script end 0.1775  1,402.6484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00402.2480200.0002
Check MTime0.00150.8348200.0001
Mysql Total
Database connection0.00060.322210.0006
Mysqli_queries0.121568.45981410.0009
Looping result0.00150.82461390.0000
Template Total0.158689.310.1586
Template load0.00100.544210.0010
Template processing0.157688.778210.1576
Override
Cache load0.00070.375110.0007
Sytem overhead
Fetch class attribute can translate value0.00080.426410.0008
XML
Image XML parsing0.00030.146510.0003
General
dbfile0.00905.0570200.0004
String conversion0.00000.002830.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs