Include and node_view_gui problem

Author Message

Maxime Thomas

Wednesday 06 September 2006 1:19:52 am

Hi,

I've just a problem with the functions <b>include</b> and <b>node_view_gui</b> and I can't figure it out.

I'm making a generic system template wich is supposed to call a template via the function include. The path of this template is variable. So I have :


{def $t='my_path'}

      {include uri=concat('design:',$t, '/test.tpl')}

{undef $t}

And it doesn't work. If I put the path directly : 'design/my_siteaccess/templates/test.tpl', it is working.

By the way, I have the same problem with the view param of node_view_gui. When you put the value of the view param in an other variable, an error occured during the load of the template. But if you put the view value directly, it's working.

Does someone have some piece of information about that ?

Max

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Xavier Dutoit

Wednesday 06 September 2006 3:26:46 am

HI,

Nope, but what would you like to do ? Something that can't be done with the override directly ?

X+

http://www.sydesy.com

Maxime Thomas

Wednesday 06 September 2006 3:37:25 am

I just want to do something like this :

{def $v='listitem'}
    
   {node_view_gui content_node=$mynode view=$t}

{undef $v}

This doesn't work.

I just want to pass a variable to the view param... I think it's a bug.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Xavier Dutoit

Wednesday 06 September 2006 3:40:40 am

I've done it for the view and it works.

Talking about bug, v != t , but I suppose that's a typo ;)

http://www.sydesy.com

Maxime Thomas

Wednesday 06 September 2006 4:01:24 am

Yes it was a typo. Cut'n'paste mistake.

And for the include ?

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

André R.

Wednesday 06 September 2006 4:11:13 am

I've used the following code without problems

{foreach $toolarray as $tool}
  {include uri=concat("design:", $tool[0]) mynode=$tool[1]}
{/foreach}

 

where a sample of $toolarray would be:

$toolarray = array( array("menu_tree.tpl", 296), array("subfolder/agenda_list.tpl", 131))

where those templates would be in:
design/mydesign/templates/menu_tree.tpl
design/mydesign/templates/subfolder/agenda_list.tpl

So I guess you see what your include problem is.. wrong paths..

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.