RE: [SMARTY] Concat. variable+string as include file
| From: | Josh Johnson | Date: | Sun, 20 Oct 2002 01:23:29 +0000 |
| Subject: | RE: [SMARTY] Concat. variable+string as include file | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6197@lists.php.net to get a copy of this message | ||
This is untested, but:
Assuming there wasn't a typo in your code:
{include file=$keyword."tpl"} might work (not perfect because of the
dot)
-- Josh
-----Original Message-----
From: Øystein Gisnås [mailto:oysteigi@stud.ntnu.no]
Sent: Friday, October 18, 2002 6:08 PM
To: smarty-general@lists.php.net
Subject: [SMARTY] Concat. variable+string as include file
I want to do this:
{include file=$keyword".tpl"}
but has to do this:
{assign var="keyword" value=$keyword}
{include file=$keyword.".tpl"}
or at least use two lines. Besides that, this code is "ugly", since it
uses the "." as in arrays. Got a proper way to do this?
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php