Forums / General / Howto find object by node_id?

Howto find object by node_id?

Author Message

Ulitsa Tal Arik

Tuesday 02 January 2007 3:13:36 am

Howto find object if I just know only node_id?

kracker (the)

Tuesday 02 January 2007 4:07:37 am

{def $use_the_force=fetch( 'content', 'node', hash( 'node_id', $node.node_id ) )} 
{$use_the_force.name|wash}

<i>http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/node
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/list</i>

//kracker

<i>back to the classics,
(an it's) all over again ...</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

kracker (the)

Tuesday 02 January 2007 4:16:39 am

Documented, <i>http://ezpedia.org/wiki/en/ez/solution_how_to_find_object_by_node_id</i>

//kracker

<i>it's not a name it's a search keyword string</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

André R.

Tuesday 02 January 2007 4:46:03 am

Shouldn't that be:

{def $my_node =fetch( 'content', 'node', hash( 'node_id', $node.node_id ) )
      $my_object=$my_node.object} 
{$my_node.name|wash}

May the force be with you :)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Ulitsa Tal Arik

Tuesday 02 January 2007 4:47:31 am

Thanks! it's work :)