Re: [SMARTY] Object reference issue

Todd Siegel <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
I added backticks per the link you sent, but it's still not working.

{include file="`$page_info->getRequestedPath()`.tpl"} (and other quote/backtick
combinations)

yields...

<?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...

unable to read resource: "`Object id #2->getRequestedPath()`.tpl"

Thanks,
Todd

--- boots <[email protected]> wrote:

> --- pbaker <[email protected]> wrote:
> > if the method returns the name U should assign the name to variable,
> > something like this:
> > 
> > {assign var="name" value=$page_info->getRequestedPath()}
> > 
> > and then  {include file="$name.tpl"}  <--- not tested :P
> 
> uhh, not exactly. This would work, but the real issue is the use of
> double quotes when they are not required.
> 
> See:
>   http://smarty.php.net/manual/en/language.syntax.quotes.php
> 
> xo boots
> 
> 
> 		
> __________________________________ 
> Yahoo! Music Unlimited 
> Access over 1 million songs. Try it free.
> http://music.yahoo.com/unlimited/
> 

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.