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 15 2025 08:54:42
Script start
Timing: Jan 15 2025 08:54:42
Module start 'layout'
Timing: Jan 15 2025 08:54:42
Module start 'content'
Timing: Jan 15 2025 08:54:44
Module end 'content'
Timing: Jan 15 2025 08:54:44
Script end

Main resources:

Total runtime1.2945 sec
Peak memory usage6,144.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 684.4766183.6875
Module start 'layout' 0.00680.0054 868.164152.5625
Module start 'content' 0.01231.2798 920.72661,696.2969
Module end 'content' 1.29200.0024 2,617.023464.5469
Script end 1.2944  2,681.5703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00610.4739160.0004
Check MTime0.00150.1133160.0001
Mysql Total
Database connection0.00070.057210.0007
Mysqli_queries1.236295.4967460.0269
Looping result0.00050.0349440.0000
Template Total1.240495.820.6202
Template load0.00360.279820.0018
Template processing1.236895.542820.6184
Template load and register function0.00140.106210.0014
states
state_id_array0.00190.145510.0019
state_identifier_array0.00330.254420.0016
Override
Cache load0.00320.2468130.0002
Sytem overhead
Fetch class attribute can translate value0.00050.040110.0005
Fetch class attribute name0.00170.129220.0008
XML
Image XML parsing0.00230.174710.0023
class_abstraction
Instantiating content class attribute0.00000.000320.0000
General
dbfile0.00380.2967160.0002
String conversion0.00000.001240.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.0002 secs