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.

eZ debug

Timing: Jan 18 2025 19:13:02
Script start
Timing: Jan 18 2025 19:13:02
Module start 'layout'
Timing: Jan 18 2025 19:13:02
Module start 'content'
Timing: Jan 18 2025 19:13:02
Module end 'content'
Timing: Jan 18 2025 19:13:02
Script end

Main resources:

Total runtime0.6579 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 587.9219152.6250
Module start 'layout' 0.00580.0032 740.546939.4609
Module start 'content' 0.00890.6474 780.0078629.1797
Module end 'content' 0.65630.0016 1,409.187520.1563
Script end 0.6579  1,429.3438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5168160.0002
Check MTime0.00130.1953160.0001
Mysql Total
Database connection0.00090.129810.0009
Mysqli_queries0.588589.4447680.0087
Looping result0.00070.1048660.0000
Template Total0.618794.020.3094
Template load0.00280.421920.0014
Template processing0.615993.616720.3080
Template load and register function0.00010.017210.0001
states
state_id_array0.00090.133410.0009
state_identifier_array0.00190.294420.0010
Override
Cache load0.00230.3458420.0001
Sytem overhead
Fetch class attribute can translate value0.00090.140530.0003
Fetch class attribute name0.00130.200490.0001
XML
Image XML parsing0.00150.227230.0005
class_abstraction
Instantiating content class attribute0.00000.0033120.0000
General
dbfile0.00100.1536290.0000
String conversion0.00000.001640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs