Share » Forums » Setup & design » scope, namespace, variable,...

scope, namespace, variable, pagelayout, templates : how to ?

scope, namespace, variable, pagelayout, templates : how to ?

Saturday 28 October 2006 4:05:14 am - 4 replies

Author Message

Paul Borgermans

Saturday 28 October 2006 8:04:45 am

Hi Claude

That does not work because $module_result.content is generated before the pagelayout is processed. Hence your variable $myvar is simply not defined yet in your override for node/view/full.tpl The other way around should work though.

hth

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Nicolas OTTAVI

Wednesday 08 November 2006 2:10:36 am

Thanks for your answer Paul,

I did the stuff in a different way according to your answer. I've defined and set as global a variable in the template which override node/view/full.tpl.

Unfortunatly I can not access this global variable from the pagelayout.tpl. Any idea ?

Regards,
Claude

*- pike

Tuesday 26 June 2007 5:15:28 am

Same problem, no solution yet. EZP 3.7.6.

In the override template (that overrides node/view/full), I write

	{def $myvar=true()}
	{set scope='global' $myvar=true()}

In the pagelayout, I try

		test: {$myvar}
		#test: {$#myvar}

nothing ?

*-pike

---------------
The class eZContentObjectTreeNode does.

André R.

Tuesday 26 June 2007 5:27:14 am

use persistent variable to send stuff from content template to pagelayout!
http://issues.ez.no/IssueView.php?Id=10956&activeItem=44

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

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu