Does Match[parent_node] work???

Does Match[parent_node] work???

Sunday 14 September 2003 10:02:55 am - 3 replies

Author Message

Paul Borgermans

Sunday 14 September 2003 11:19:50 am

Take a look at the compiled version of your override.ini file in

var/cache/override

Do you see something for the node there?

If not and you cleared the ini cache, than it is a bug.

-paul

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

Nicklas Lundgren

Sunday 14 September 2003 12:42:15 pm

Thanks for the fast reply!
Everything looks fine in the compiled version - view snippet below.
I suspect that the key parent_node is not implemented in the kernel. When trying with Match[node] it works fine. However, I really need to use parent_node...

Any suggestion on workarounds?

Kind Regards,
Nicklas Lundgren

--------
else if ( $matchFile == "/node/view/line.tpl" )
{
if ( $matchKeys['parent_node'] == '101' and $matchKeys['class'] == '2' )
{
return 'design/owndesign/override/templates/newsarticle_line.tpl';
}
if ( $matchKeys['class'] == '1' )
{
return 'design/owndesign/override/templates/leftmenu_line.tpl';
}
if ( $matchKeys['class'] == '2' )
{
return 'design/owndesign/override/templates/leftmenu_line.tpl';
}
if ( $matchKeys['class'] == '6' )
...
--------

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Nicklas Lundgren

Sunday 14 September 2003 12:58:22 pm

There is probably a bug here.
I inserted the following code in the compiled version of override.ini.append:
-------
foreach($matchKeys as $m=>$v){
echo($m." is ".$v."<br />");
}
-------
The result was very clear. Every instance of parent_node has the value 2. View snippet below:
-------
section is 10<br />object is 126<br />node is 100<br />parent_node is 2<br />class is 1<br />view_offset is 0<br />viewmode is full<br />depth is 2<br />section is 10<br />object is 137<br />node is 111<br />parent_node is 2<br />class is 2<br />view_offset is 0<br />viewmode is full<br />depth is 2<br />
section is 10<br />object is 126<br />node is 100<br />parent_node is 2<br />class is 1<br />view_offset is 0<br />viewmode is full<br />depth is 2<br />section is 10<br />object is 126<br />node is 100<br />parent_node is 2<br />class is 1
-------

Does anyone know from where in the Kernel, the compiled file is called?

Regards,
Nicklas Lundgren

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.