Gettting at an image URL

Gettting at an image URL

Thursday 14 October 2004 3:38:15 pm - 5 replies

Author Message

Lazaro Ferreira

Thursday 14 October 2004 4:27:05 pm

Hi,

Try this

img src={$:item.object.data_map.image.content.url|ezroot}

or this

{let myimage=$:item.object.data_map.image.content['original']}
....
<img src={$myimage.url|ezroot} />
.....
{/let}

Lazaro
http://www.mzbusiness.com

Deane Barker

Thursday 14 October 2004 8:41:08 pm

Neither option worked. The first one just output two double quotes (""), and the second did nothing. Here's all the code I'm working with:

{let images=fetch(	'content', 
			'list', 
			hash(	'parent_node_id', $node.node_id,
				'class_filter_type',  'include',
				'class_filter_array', array('image' ) ) )}
{section name=images loop=$images}
{$:item.object.data_map.image.content.url|ezroot}
{/section}
{/let}

As you can see, I'm just trying to print the URL for now. When I can do that, I'll put it in the IMG tag.

I'm confused about the ".content" part of the path. Is "content" a sub-part of any attribute? Or just image attributes? For instance, for the first name, I just have to do:

$node.object.data_map.fname

Does the text datatype have a "content" sub-part?

Deane

Lazaro Ferreira

Friday 15 October 2004 1:37:15 am

Hi,

As far as I know some attributes have this

content

property , i.e: image, binary file

Have you enabled your debug output, and clear all of your cache before testing your changes ?

Lazaro
http://www.mzbusiness.com

Martin Ulrich

Friday 15 October 2004 3:12:55 am

I dont know if this helps. I do not know much about code writing, but in my slideshow I loop the imagepaths:

{section name=Child loop=$slide}
{$Child:item.data_map.image.content[large].full_path}
{/section}

Sebastian

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Deane Barker

Friday 15 October 2004 7:17:20 am

Thanks -- with a little fiddling, I got this:

{$Child:item.data_map.image.content[large].url|ezurl}

That does it. I'm still not sure about the part of the path that starts ".content", but I'm not complaining that this problem is solved.

Deane

You must be logged in to post messages in this topic!

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