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

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 20 2025 02:38:32
Script start
Timing: Jan 20 2025 02:38:32
Module start 'layout'
Timing: Jan 20 2025 02:38:32
Module start 'content'
Timing: Jan 20 2025 02:38:32
Module end 'content'
Timing: Jan 20 2025 02:38:32
Script end

Main resources:

Total runtime0.0196 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0089 589.1563152.6250
Module start 'layout' 0.00890.0037 741.781339.4453
Module start 'content' 0.01260.0048 781.226693.4453
Module end 'content' 0.01740.0022 874.671938.3047
Script end 0.0196  912.9766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002914.5944140.0002
Check MTime0.00126.2112140.0001
Mysql Total
Database connection0.00178.667310.0017
Mysqli_queries0.004221.549930.0014
Looping result0.00000.076510.0000
Template Total0.00189.010.0018
Template load0.00105.050610.0010
Template processing0.00083.931210.0008
Override
Cache load0.00073.641010.0007
General
dbfile0.00031.656080.0000
String conversion0.00000.049840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs