Forums / Developer / How to use Match[persistent_variable]
Luc Chase
Thursday 05 July 2007 7:18:26 pm
How is this override.ini condition used??
The Web Application Service Provider
Bruce Morrison
Thursday 05 July 2007 9:28:53 pm
Hi Luc
From: doc/changelogs/3.5/CHANGELOG-3.4.4-to-3.5.0 - Added support for the template variable 'persistent_variable', which can be used to communicate between content templates and other templates, even though content caching is on. It can be set for example with {set scope=global persistent_variable=42} and fetched with {$module_result.content_info.persistent_variable}
http://ez.no/doc/ez_publish/technical_manual/3_9/reference/template_override_conditionssays it can be used in the override of the node/view/*.tpl
So I assume that you can site it in a template then have an override that display a different template dependant on the value. E.G.
[magic_pockets_meaningoflife] Source=node/view/full.tpl MatchFile=magic_pocket_meaningoflife.tpl Subdir=templates Match[class_identifier]=pocket Match[section]=34 Match[persistent_variable]=42 [magic_pockets] Source=node/view/full.tpl MatchFile=magic_pocket.tpl Subdir=templates Match[class_identifier]=pocket Match[section]=34
HTH
CheersBruce
My Blog: http://www.stuffandcontent.com/ Follow me on twitter: http://twitter.com/brucemorrison Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish
Friday 06 July 2007 4:10:22 am
Looks promising! I think I'm nearly there. I need to set the varialble from another template. But so far this does not work...
{node_view_gui view=line content_node=$child persistent_variable=42}
Friday 06 July 2007 4:18:52 pm
You are setting the variable incorrectly. You'll need something like:
{set scope=global persistent_variable=42} {node_view_gui view=line content_node=$child}
I haven't tested this just going on the docs.
Björn [email protected]
Wednesday 18 July 2007 3:24:27 pm
http://issues.ez.no/IssueView.php?Id=11145&
this is the solution!
plus I fixed bug 11144
Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs Looking for hosting? http://hostingezpublish.com ----------------------------------------------------------------------------- GMT +01:00 Hannover, Germany Web: http://www.xrow.com/