$module_result without node_id

Author Message

Oliver Dzierzon

Tuesday 03 February 2009 2:05:44 am

Using my pagelayout.tpl template I previously got the node_id until I did something wrong.
Unfortunately I do not know what's the reason.

Using the following code


{$module_result | attribute(view,1)}

only outputs:

<b>Attribute Type</b>
content string
path array
is_default_navigation_part boolean
navigation_part string
ui_context string
ui_component string
uri string

What happens with my node_id and section_id value

ciao Olli

Oliver Dzierzon

Tuesday 03 February 2009 2:31:21 am

The problem is solved even if I not really understand why it now works.

I formerly added an siteaccess for "index.php/de/" which seems to be the reason for the mentioned problem.

Now I edited the "anonymous" role. I now added the directive:

user login SiteAccess( de )

and now it works. I dont't know why. Who can explain the context between siteaccess an user login?

Thank you

Ciao Olli

André R.

Tuesday 03 February 2009 3:22:21 am

user/login is not a node view* in anyway, so thats why there are no node_id there.
Read (especially the $module_result parts):
http://ez.no/doc/ez_publish/technical_manual/4_0/templates/the_pagelayout/variables_in_pagelayout

* node view: content/view

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

Oliver Dzierzon

Tuesday 03 February 2009 4:56:12 am

I know. Therefore I'm surprised that my "pagelayout.tpl" works properly after I added the mentioned directive to the rule and not without.

...

<div id="main">
	{if $module_result.section_id | eq(1)}
		{* Artikelanzahl Spalte1*}
		{def $col1 = fetch('content',
		       'list_count',
			hash('parent_node_id', $module_result.node_id, 
			    'class_filter_type', 'include',
			    'class_filter_array', array('article_standard'),
			    'attribute_filter',array('and',
				  array(354,'=',0),
				  array('article_standard/title','like','*Test*')
			     )
			)
		)
	}

...

because

http://localhost/ezDemo/index.php/de/

is the default siteaccess and should request an node content

ciao Olli

André R.

Tuesday 03 February 2009 2:12:29 pm

Anonymous user still needs access to the siteaccess even if the siteaccess is the default one.

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

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 31 2025 04:27:11
Script start
Timing: Jan 31 2025 04:27:11
Module start 'layout'
Timing: Jan 31 2025 04:27:11
Module start 'content'
Timing: Jan 31 2025 04:27:11
Module end 'content'
Timing: Jan 31 2025 04:27:11
Script end

Main resources:

Total runtime0.0141 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.0051 588.1328151.2109
Module start 'layout' 0.00510.0032 739.343836.6484
Module start 'content' 0.00830.0043 775.992294.2656
Module end 'content' 0.01260.0014 870.257837.9922
Script end 0.0141  908.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002316.5728140.0002
Check MTime0.00118.0099140.0001
Mysql Total
Database connection0.00074.810010.0007
Mysqli_queries0.003323.339630.0011
Looping result0.00000.077810.0000
Template Total0.00118.010.0011
Template load0.00085.802810.0008
Template processing0.00032.107310.0003
Override
Cache load0.00053.710710.0005
General
dbfile0.00031.794480.0000
String conversion0.00000.049040.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