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.

eZ debug

Timing: Jan 18 2025 19:14:24
Script start
Timing: Jan 18 2025 19:14:24
Module start 'layout'
Timing: Jan 18 2025 19:14:24
Module start 'content'
Timing: Jan 18 2025 19:14:25
Module end 'content'
Timing: Jan 18 2025 19:14:25
Script end

Main resources:

Total runtime0.8196 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 589.5938152.6563
Module start 'layout' 0.00760.0034 742.250039.5078
Module start 'content' 0.01100.8066 781.7578609.6406
Module end 'content' 0.81760.0020 1,391.398416.0938
Script end 0.8196  1,407.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5048160.0003
Check MTime0.00140.1697160.0001
Mysql Total
Database connection0.00130.163010.0013
Mysqli_queries0.753991.9753650.0116
Looping result0.00060.0759630.0000
Template Total0.779695.120.3898
Template load0.00250.300420.0012
Template processing0.777194.809520.3885
Template load and register function0.00010.012410.0001
states
state_id_array0.00100.125110.0010
state_identifier_array0.00080.094520.0004
Override
Cache load0.00210.2562230.0001
Sytem overhead
Fetch class attribute can translate value0.00100.116230.0003
Fetch class attribute name0.00100.120280.0001
XML
Image XML parsing0.00160.198730.0005
class_abstraction
Instantiating content class attribute0.00000.0026100.0000
General
dbfile0.00160.1922300.0001
String conversion0.00000.001140.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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/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: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs