Showing the image with a certain node ID

Author Message

Felix Laate

Tuesday 08 February 2005 4:01:07 am

Hi all!

I'm working on an imagemap-extension, and I admit that this probably means that I should know the answer of my question..

Let's say I know the node_id (and that's all I know..) of a certain image and I want to display it in its small, medium, large or original size.

How is this done?

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Olivier Pierret

Tuesday 08 February 2005 5:05:48 am

Hello

I think you should dig a bit into a call to the operators fetch & attribut_view_gui, node_view_gui:

(code below were not tested)

{let $node = fetch( 'content', 'node', hash('node_id', $node_id))}
{attribute_view_gui attribute=$node.content.data_map.image_attribute_name}
{/let}

or alternately if the node is associated to the actual image content:

{node_view_gui node=$node view=full}

additional tip: it is always a good idea to dig in the ezpublish templates to check wether you can pass arguments to the template and get a more customized result

Hope this helps.

Olivier Pierret

Felix Laate

Tuesday 08 February 2005 5:31:33 am

Hi Olivier!

Thank you for your answer. Unfortunatly it's not what I need (I think..). Let me explain what I'm trying to do:

Admin
----------

Step 1 - choose image (works well, and the node_id is "handed" over to the next step)

Step 2 - points on the map are added. A preview (this is what I can't get to work) of the map should be shown, as the point is calculated with javascript onlick on the image.

Step 3 - the point is added to the content of the site. (haven't gotten there yet)

User
-------

All points that "belong to" a node are fetched and an imagemap drawn.

Felix

PS! I tried to do some magic with "eZContentObjectTreeNode::fetch", but I can't find any docs showing how exactly to use it.

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

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