Thumnail image display - urgent

Author Message

Ashwini V

Tuesday 08 March 2005 10:26:32 pm

Hi,
My aim is to display image of an article. Before this, I validated whether image is avilable for the article or not using the following code.

"is_object($content_version.data_map.resource_thumbnail.content)}"
(Ezpublish 3.2-4)

Now in Ezpublish 3.5 this code doesnt work. I had tried the following code in 3.5, but it didn't work.
"is_object($content_version.object.data_map.resource_thumbnail.content)}"
In ezpublish 3.5.0. This returns that the article contains an image, but it doesnt display the image.

I even tried with has_content, but it didn't work. This doesnt even return whether the article has image or not.

Please help me as to how to display images.

Ɓukasz Serwatka

Tuesday 08 March 2005 10:37:38 pm

Hi

You should use attribute_view_gui

{attribute_view_gui attribute=$node.object.data_map.resource_thumbnail}

or

{$node.object.data_map.resource_thumbnail.content['original'].url|ezroot}

Second code displays path to your image and can be use in <img> tag.

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

Ashwini V

Friday 11 March 2005 10:28:21 pm

Hi,

I have tried out the code which you gave, but it didnt work. Any other ideas?

Thanks
Karthi

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 18 2025 19:31:42
Script start
Timing: Jan 18 2025 19:31:42
Module start 'layout'
Timing: Jan 18 2025 19:31:42
Module start 'content'
Timing: Jan 18 2025 19:31:43
Module end 'content'
Timing: Jan 18 2025 19:31:43
Script end

Main resources:

Total runtime1.4049 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 589.0469152.6250
Module start 'layout' 0.00670.0032 741.671939.4453
Module start 'content' 0.01001.3933 781.1172547.4922
Module end 'content' 1.40320.0016 1,328.609412.1641
Script end 1.4049  1,340.7734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2390160.0002
Check MTime0.00130.0928160.0001
Mysql Total
Database connection0.00080.060310.0008
Mysqli_queries1.348595.9876570.0237
Looping result0.00070.0495550.0000
Template Total1.361096.920.6805
Template load0.00220.157820.0011
Template processing1.358796.713720.6794
Template load and register function0.00010.008710.0001
states
state_id_array0.00300.216010.0030
state_identifier_array0.00490.347520.0024
Override
Cache load0.00190.1329270.0001
Sytem overhead
Fetch class attribute can translate value0.00060.044320.0003
Fetch class attribute name0.00210.147050.0004
XML
Image XML parsing0.00110.080520.0006
class_abstraction
Instantiating content class attribute0.00000.001060.0000
General
dbfile0.00110.0754240.0000
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs