Re: [SMARTY] Variable/String concatenation
| From: | Monte Ohrt | Date: | Thu, 25 Apr 2002 21:00:37 +0000 |
| Subject: | Re: [SMARTY] Variable/String concatenation | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3889@lists.php.net to get a copy of this message | ||
You can use variables like so:
{include file="$template/index.tpl"}
However, catenating text, something like:
{include file="$prefixindex.tpl"}
where "prefix" is the name of your variable, this obviously wouldn't work. Smarty doesn't support concatentation syntax, But you could write a simple concatentation modifier to get around it.
example:
{$include file=$prefix|concat:"index.tpl"}
Mitchell Vincent wrote:
Hey all, new to Smarty and to the list (as if this question won't make that obvious!).. I'm wondering if there is any way to so some string/variable concatenation like : {include file="heading.tpl" heading="<variable here> News"} I can't seem to find anything that gives a definite yes or no but I could very possibly have looked over it. Thanks! -Mitch-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.