Share » Forums » Setup & design » $node no more accessable in 3.4? (am...

$node no more accessable in 3.4? (am I dreaming?)

$node no more accessable in 3.4? (am I dreaming?)

Thursday 05 August 2004 7:49:41 am - 3 replies

Modified on Thursday 05 August 2004 7:50:27 am by Stefano Guandalini

Author Message

Paul Borgermans

Thursday 05 August 2004 8:25:22 am

Stefano,

$node is only available in content view templates, not pagelayout templates and its includes except when called the first time with view caching on or all the time with view caching off in the 3.3 series and before.

With 3.4 the caching has changed a bit

I suggest to create your own $currentnode variable based on $module_result.node_id

{let currentnode=fetch(content,node,hash(node_id,$module_result.node_id}
.....
{/let}

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Zoltan Szabo

Wednesday 11 August 2004 11:12:40 am

I had the same experience: "Am I dreaming?"
A lot of documentation page speaks about this $node thing...

A have a lot of problems with strange and un-decodeable variables in eZp, mainly in xml parts. How could I obtain some parts of the xml text without using the builtin "content" possibilities?

Paul Borgermans

Wednesday 11 August 2004 11:31:22 am

There is no possibility out of the box to access xml parts of xml text fields.

However, you may achieve something by either

- use the xslt operator from the contributions to transform/select part of the xml content
- fetch the raw xml content and use javascript DOM on it

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

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

36 542 Users on board!

Forums menu