$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.