|
Posted by Todd Siegel on 10/20/05 18:10
I've messed with this for a while and can't figure it out.
In my PHP I have:
$smarty->assign_by_ref('page_info', $page_info);
In my template I have...
{if $page_info->getRequestedPath() == "products-services"}
....
{/if}
which compiles into...
<?php if ($this->_tpl_vars['page_info']->getRequestedPath() ==
"products-services"): ?>
...and works fine. Then a few lines later, in the same template, I have:
{include file="$page_info->getRequestedPath().tpl"}
which compiles to...
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' =>
($this->_tpl_vars['page_info'])."->getRequestedPath().tpl",
'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
....and does not work.
Obviously I get this in the log:
Smarty error: unable to read resource: "Object id #2->getRequestedPath().tpl"
What's causing this?
Thanks in advance,
Todd
Navigation:
[Reply to this message]
|