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.

eZ debug

Timing: Jan 19 2025 01:01:41
Script start
Timing: Jan 19 2025 01:01:41
Module start 'layout'
Timing: Jan 19 2025 01:01:41
Module start 'content'
Timing: Jan 19 2025 01:01:42
Module end 'content'
Timing: Jan 19 2025 01:01:42
Script end

Main resources:

Total runtime1.3348 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 590.4219152.6406
Module start 'layout' 0.00540.0030 743.062539.4766
Module start 'content' 0.00851.3248 782.5391534.7813
Module end 'content' 1.33330.0015 1,317.320312.1250
Script end 1.3347  1,329.4453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2560160.0002
Check MTime0.00140.1033160.0001
Mysql Total
Database connection0.00050.038710.0005
Mysqli_queries1.279295.8345570.0224
Looping result0.00060.0428550.0000
Template Total1.303097.620.6515
Template load0.00180.138120.0009
Template processing1.301297.483420.6506
Template load and register function0.00010.007110.0001
states
state_id_array0.00130.096510.0013
state_identifier_array0.00130.095420.0006
Override
Cache load0.00150.1139330.0000
Sytem overhead
Fetch class attribute can translate value0.00060.042220.0003
Fetch class attribute name0.00140.107440.0004
XML
Image XML parsing0.00050.035720.0002
class_abstraction
Instantiating content class attribute0.00000.000850.0000
General
dbfile0.00150.1128160.0001
String conversion0.00000.000740.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs