Forums / Developer / Include and node_view_gui problem

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

eZ debug

Timing: Jan 18 2025 16:24:57
Script start
Timing: Jan 18 2025 16:24:57
Module start 'content'
Timing: Jan 18 2025 16:24:58
Module end 'content'
Timing: Jan 18 2025 16:24:58
Script end

Main resources:

Total runtime0.7392 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.7344180.8281
Module start 'content' 0.00580.6269 768.5625634.2578
Module end 'content' 0.63270.1065 1,402.8203341.0547
Script end 0.7392  1,743.8750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.5892210.0002
Check MTime0.00160.2140210.0001
Mysql Total
Database connection0.00080.107310.0008
Mysqli_queries0.663489.73912050.0032
Looping result0.00200.27542030.0000
Template Total0.713596.520.3567
Template load0.00250.335220.0012
Template processing0.711096.182120.3555
Template load and register function0.00010.014110.0001
states
state_id_array0.00090.115410.0009
state_identifier_array0.00090.116320.0004
Override
Cache load0.00220.3003420.0001
Sytem overhead
Fetch class attribute can translate value0.00080.112640.0002
Fetch class attribute name0.00090.124990.0001
XML
Image XML parsing0.00170.226540.0004
class_abstraction
Instantiating content class attribute0.00000.0028120.0000
General
dbfile0.00210.2814400.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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