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}
|
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
|