Re: [SMARTY-GENERAL] include_php problems
| From: | Thomas Meitz | Date: | Tue, 02 Apr 2002 15:31:46 +0000 |
| Subject: | Re: [SMARTY-GENERAL] include_php problems | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3436@lists.php.net to get a copy of this message | ||
cause this give me this error:
Fatal error: Smarty: [in toplevelnav.tpl line 4]: syntax error: 'file: $portal_functions/system.navigation.php' is not readable in /usr/local/lib/php/Smarty_Compiler.class.php on line 1316
It seems, that include_php not work with variables.
Are only strings allowed?
At 09:23 02.04.2002 -0600, you wrote:
Actually, why not just do this? {include_php file="$portal_functions/system.navigation.php"} Thomas Meitz wrote:Fatal error: Smarty: [in toplevelnav.tpl line 3]: syntax error: 'file: $this->_tpl_vars['nav_path']' is not readable in /usr/local/lib/php/Smarty_Compiler.class.php on line 1316 Line 3: {include_php file=$nav_path} The value if I print {$nav_path}: /www/htdocs/webserver/portal/functions/system.navigation.php If I use {include_php file="/www/htdocs/webserver/portal/functions/system.navigation.php"} the navigation works.-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc. -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpWhat is the error you get? What is the value if you print {$nav_path} ? Thomas Meitz wrote:Hi everybody, I want to do following in my template file: {assign var="nav_path" value="$portal_functions/system.navigation.php"} {* <== this works *}-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc. -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php{include_php file=$nav_path} {* <== this not *}But all what I've tried gives me smarty errors. Any suggestions? Greets Tom