Forums / Setup & design / $module_result without node_id

$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

eZ debug

Timing: Jan 31 2025 01:17:10
Script start
Timing: Jan 31 2025 01:17:10
Module start 'content'
Timing: Jan 31 2025 01:17:10
Module end 'content'
Timing: Jan 31 2025 01:17:11
Script end

Main resources:

Total runtime0.2031 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 587.9375370.2969
Module start 'content' 0.00820.0176 958.23441,005.6406
Module end 'content' 0.02590.1772 1,963.87503,894.7188
Script end 0.2031  5,858.5938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00472.3337200.0002
Check MTime0.00140.6699200.0001
Mysql Total
Database connection0.00130.646810.0013
Mysqli_queries0.099148.79121410.0007
Looping result0.00130.64761390.0000
Template Total0.176887.010.1768
Template load0.00100.471610.0010
Template processing0.175886.544510.1758
Override
Cache load0.00060.307110.0006
Sytem overhead
Fetch class attribute can translate value0.00180.872210.0018
XML
Image XML parsing0.00040.210210.0004
General
dbfile0.00753.7067200.0004
String conversion0.00000.003130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

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

Time used to render debug report: 0.0002 secs