How to show an article image attribute in a folder.full template

Author Message

Jack Rackham

Saturday 05 February 2005 7:21:21 am

I am trying to show an article image attribute in a FrontPage template, but I am only able to fetch the Url of the image.

My code

{let articleList=fetch( content, tree, hash( parent_node_id, 2,
                                           limit, 9,
                                           sort_by, array( published, false() ),
                                           attribute_filter, array( array( 249, '=', '1' ) ),

                                            ) )}

<div id="mediumnews">
{section var=news3 max=5 loop=$articleList}
 
   <div class="child4">
    	

{$news3.item.data_map.temp_bilde.content[small].full_path} 
   
  
   
   
   <a href={$news3.item.url_alias|ezurl}>{$news3.item.name|wash}</a>
   
   
   </div>
{/section}

</div>
{/let}

Łukasz Serwatka

Saturday 05 February 2005 8:00:20 am

{$news3.item.data_map.temp_bilde.content[small].url|ezroot}

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

Jack Rackham

Saturday 05 February 2005 9:10:54 am

It did not work. It only shows the url not the picture.

{$news3.item.data_map.temp_bilde.content[small].full_path} ----> var/magasinet/storage/images-versioned/1721/11-nor-NO/test1.jpg

{$news3.item.data_map.temp_bilde.content[small].url|ezroot} -----> "var/magasinet/storage/images-versioned/1721/11-nor-NO/test1.jpg"

Eivind Marienborg

Saturday 05 February 2005 10:06:44 am

Well, since you only get the code, you have to place it in an <img src="">-tag.

Or you could use this:

{attribute_view_gui attribute=$news3.item.data_map.temp_bilde}

Łukasz Serwatka

Saturday 05 February 2005 12:47:43 pm

Hi

{let articleList=fetch( content, tree, hash( parent_node_id, 2,
                                           limit, 9,
                                           sort_by, array( published, false() ),
                                           attribute_filter, array( array( 249, '=', '1' ) ),

                                            ) )}

<div id="mediumnews">
{section var=news3 max=5 loop=$articleList}
 
   <div class="child4">
    	
{*Display image*}

<img src={$news3.item.data_map.temp_bilde.content[small].url|ezroot}
 width="{$news3.item.data_map.temp_bilde.content[small].width}"
 height="{$news3.item.data_map.temp_bilde.content[small].height}" />
   
  
   
   
   <a href={$news3.item.url_alias|ezurl}>{$news3.item.name|wash}</a>
   
   
   </div>
{/section}

</div>
{/let}

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.