Forums / Developer / Thumnail image display - urgent

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