fetching a template in php

Author Message

ludo thomas

Wednesday 06 July 2005 6:45:17 am

hi ,
these days I'm trying to fetch a template into a custom workflow.
my code:

include_once( "kernel/common/template.php" );
			
	$tpl = & templateInit();
		
	 $TemplateResult =& $tpl->fetch( 'design:news/test.tpl' );

2 problems:

*I'm not sure that kernel/common/template is include (if I give a wrong path I dont have any error and templateInit()seems to be OK)

*news/test.tpl seems not te be executed (I can give a wrong path and that change nothing)

I have clear my cache ;-)
all my code is here:http://ez.no/community/forum/developer/how_to_send_an_object_into_email

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 20 2025 07:52:07
Script start
Timing: Jan 20 2025 07:52:07
Module start 'layout'
Timing: Jan 20 2025 07:52:07
Module start 'content'
Timing: Jan 20 2025 07:52:08
Module end 'content'
Timing: Jan 20 2025 07:52:08
Script end

Main resources:

Total runtime0.8504 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0094 589.1563152.6250
Module start 'layout' 0.00940.0032 741.781339.4453
Module start 'content' 0.01260.8364 781.2266435.9609
Module end 'content' 0.84900.0014 1,217.18758.1641
Script end 0.8504  1,225.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4200160.0002
Check MTime0.00130.1522160.0001
Mysql Total
Database connection0.00110.126110.0011
Mysqli_queries0.806794.8614460.0175
Looping result0.00050.0545440.0000
Template Total0.816596.020.4082
Template load0.00200.240620.0010
Template processing0.814495.772520.4072
Template load and register function0.00010.012010.0001
states
state_id_array0.00070.084710.0007
state_identifier_array0.00090.111420.0005
Override
Cache load0.00170.1950130.0001
Sytem overhead
Fetch class attribute can translate value0.00070.085510.0007
Fetch class attribute name0.00070.078420.0003
XML
Image XML parsing0.00050.063410.0005
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00090.1039160.0001
String conversion0.00000.001140.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs