smarty fetch include on the fetched tpl page fails-Collection of common programming errors
My ajax php located in maindirexample/actions is calling a tpl file one folder up in maindirexample/templates
fetch('../templates/popupMyItems.tpl');
However this throws an error
Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'list-myItems.tpl' in '../templates/popupMyItems.tpl'
popupMyitems.tpl seems to be called ok, however list-myItems.tpl fails (this is included in popupMyitems.tpl) ..
{foreach
from=$uniquecategories item=category name=cat}
{if $smarty.foreach.cat.first} {include file="list-myItems.tpl"
category="{$category|replace:' ':''}" active="true"}
{else} {include
file="list-myItems.tpl" category="{$category|replace:' ':''}"
active="false"} {/if}
{/foreach}
Using
{include file="../templates/list-myItems.tpl"}
also fails :
'SmartyException' with message 'Unable to load template file 'list-myItems.tpl' in '../templates/popupMyItems.tpl'' in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_templatebase.php:127 Stack trace: #0 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_template.php(286): Smarty_Internal_TemplateBase->fetch(NULL, NULL, NULL, NULL, false, false, true) #1 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\main\actions\templates_c\07c3452c9173e47b89ab427877861e26b839928c.file.popupMyItems.tpl.php(52): Smarty_Internal_Template->getSubTemplate('list-myItems.tp...', NULL, NULL, NULL, NULL, Array, 0) #2 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_templatebase.php(180): content_5236279826e113_69075833(Object(Smarty_Internal_Template)) #3 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\main\actions in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_templatebase.php on line
Any ideas?
Thanks