Forums / Developer / Module .tpl issue / Comment62261

Author Topic

Christian Rößler

Sunday 03 October 2010 10:52:38 am

Comment62261

Have you setup your extension to serve designs/templates?

extension/newextension/settings/site.ini.append.php

[TemplateSettings]
ExtensionAutoloadPath[]=newextension

Then put your template in

extension/newextension/design/standard/templates/somefolder/list.tpl

and you can refer to it in your module-php-code via

$tpl = templateInit();
$tpl->setVariable('foo', $foo); 
$templateResult = $tpl->fetch( 'design:somefolder/list.tpl' ); 

$Result = array();
$Result['content'] = $templateResult;

That should it be.

Chris.

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613