Forums / Developer / I can't see $node.attributes

I can't see $node.attributes

Author Message

Daniel Lopes

Wednesday 01 April 2009 11:30:18 am

Hi,

I can't see node's atributtes.

Example:

The ID of the node: {$node.node_id} <br />
The ID of the object encapsulated by the node: {$node.object.id} <br />
The name of the object: {$node.object.name} <br />
First time the object was published: {$node.object.published|l10n( shortdate)}

Output was this:

The ID of the node:
The ID of the object encapsulated by the node:
The name of the object:
First time the object was published: 31/12/1969

thanks

André R.

Wednesday 01 April 2009 12:15:14 pm

enable debug output.

'31/12/1969' (unix time = 0 or -1) suggests that the node variable is not defined in the template you try to use it.

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

Daniel Lopes

Wednesday 01 April 2009 1:15:15 pm

Hi André,

I'm starting with eZPublish and
I could write in this way: "my_site / site.ini.append.php"

[DebugSettings]
DebugOutput = enable


As I see (UNIX = 0 or -1)?

I will use for:

{if eq( $node.node_id, 103 )}
class="my_class_css"
{else}
class="my_other_class_css" 
{/if}


thanks

Gaetano Giunta

Thursday 02 April 2009 1:42:37 am

[DebugSettings]
DebugOutput = enable

is slightly wrong

[DebugSettings]
DebugOutput=enabled

is better:
- no spaces around equal sign (and after the "enabled" string) are allowed, sorry
- you miss a "d"

Principal Consultant International Business
Member of the Community Project Board

Daniel Lopes

Thursday 02 April 2009 6:40:35 am

Thanks André and Gaetano,

It was "language's problem". That's all enabled!

For templates I used:

{if eq($module_result.node_id,73)}

And It's all right!

Regards