Forums / Setup & design / Cannot display path of image

Cannot display path of image

Author Message

willy jansen

Tuesday 07 September 2004 4:16:57 am

I'd like to display the path of the image of ana article. I want to create a list of articles on my homepage using onoly the article's title and the image.
I want to put the path in a IMG tag.

I'm on epubl 3.4 but the {$Child:item.object.data_map.image.content.medium.url} as suggested here http://ez.no/ez_publish/download/changelogs/ez_publish_3_3/new_image_system returns nothing.

I use the code below. (I'm not a programmer, I just copy-and-modify examples from the ez.no web)

{let children=fetch( content, list, hash( parent_node_id, $node.node_id,
                                     sort_by, $node.sort_array,
                                     limit, 7,
                                     class_filter_type, include,
                                     class_filter_array, array( 'article' ) ) )}
 {section name=Child loop=$children}
  <a href={$Child:item.url_alias|ezurl}>
   <img src="{$Child:item.object.data_map.image.content.medium.url}">
  </a>
  <br>
  {$Child:item.object.data_map.title.content|wash}
 {/section}
{/let}

Anybody a clue what is going wrong?

willy jansen

Thursday 09 September 2004 1:25:30 am

bumped it up.

I'd like to know how to fetch the image (or the images url) without using attribute_view_gui

Ole Morten Halvorsen

Thursday 09 September 2004 6:37:06 am

Hi,

To get the full url use:

{$Child:item.object.data_map.image.content.medium.url|ezroot}

For more information do:

{$Child:item.object.data_map.image.content|attribute(show)}

This will print out debug information about the image attribute.

Ole M.

Senior Software Engineer - Vision with Technology

http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh

eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578

willy jansen

Thursday 09 September 2004 7:19:52 am

Thanks Ole , but {$Child:item.object.data_map.image.content.medium.url|ezroot} returns an empty string ""

What may be the trouble here?

The debug info says:
Missing argument 4 for checkaccess() in /home/httpd/vhosts/MYSTE/httpdocs/kernel/classes/ezcontentobjecttreenode.php on line 2576

willy jansen

Thursday 09 September 2004 11:36:19 am

It seems the problem has to do with my configuration.

I'm looking for someone who can help me solving this problem.

If you are interested: my email is: batigolix@yahoo.co.uk

eZ debug

Timing: Jan 18 2025 15:59:15
Script start
Timing: Jan 18 2025 15:59:15
Module start 'content'
Timing: Jan 18 2025 15:59:15
Module end 'content'
Timing: Jan 18 2025 15:59:16
Script end

Main resources:

Total runtime0.6964 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 589.1406180.8359
Module start 'content' 0.00720.5566 769.9766530.9688
Module end 'content' 0.56380.1324 1,300.9453338.1016
Script end 0.6963  1,639.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5902210.0002
Check MTime0.00150.2200210.0001
Mysql Total
Database connection0.00150.211710.0015
Mysqli_queries0.622189.33552000.0031
Looping result0.00240.34131980.0000
Template Total0.667995.920.3339
Template load0.00220.315920.0011
Template processing0.665695.585920.3328
Template load and register function0.00020.029710.0002
states
state_id_array0.00090.125110.0009
state_identifier_array0.00070.097520.0003
Override
Cache load0.00180.2613300.0001
Sytem overhead
Fetch class attribute can translate value0.00100.138130.0003
Fetch class attribute name0.00110.154250.0002
XML
Image XML parsing0.00040.062330.0001
class_abstraction
Instantiating content class attribute0.00000.001650.0000
General
dbfile0.00520.7498210.0002
String conversion0.00000.000930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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

Time used to render debug report: 0.0002 secs