using braces

using braces

Thursday 31 August 2006 2:50:44 am - 4 replies

Author Message

David Jones

Thursday 31 August 2006 4:12:17 am

I've fixed this issue now.

The problem I have now is that I can't display the image.

The code below displays the title field of my image_header class

$related_object.data_map.title.content|wash

but

This code does not display the image

$related_object.data_map.image.content|wash

image is the identifiyer of the image field so I expected this to output the path to the image.

It doesn't output anything.

Any ideas?

Thanks

Kristof Coomans

Thursday 31 August 2006 6:06:54 am

The content attribute of an image returns an eZImageAliasHandler object ( http://ez.no/doc/ez_publish/technical_manual/3_8/reference/objects/ezimagealiashandler ).

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Rob Borley

Thursday 31 August 2006 6:12:10 am

David, I think you want to end up with something like this:

{let related_objects=fetch( 'content', 'related_objects',
				  		hash( 'object_id', $module_result.content_info.object_id ) )}

	{section loop=$related_objects var=related_object}
		{if eq($related_object.content_class.identifier, "image_header" )}
		<style type="text/css" media="screen">
					body.sid1 #navigationContainer {concat('{')}

			background-image: url({$related_object.data_map.image.content.original.full_path|ezroot}) !important;
				}
				</style>
		{/if}
	{/section}

David Jones

Thursday 31 August 2006 6:20:04 am

perfect, thanks

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.