Re: [SMARTY] Using arrays as input to plugins
| From: | Mark Rogers | Date: | Thu, 27 Apr 2006 13:47:59 +0000 |
| Subject: | Re: [SMARTY] Using arrays as input to plugins | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-13401@lists.php.net to get a copy of this message | ||
Cody Caughlan wrote:
> {include file=$foobar.file}
>
This should work exactly as you would expect it to. I think what you
actually have a problem with is:
{include file="$foobar.file"}
.. which is a completely different thing, and is indeed interpreted as $foobar . '.file'.
Jeroen's comment to read the manual
(http://smarty.php.net/manual/en/language.syntax.quotes.php) is valid if this is what you are trying
to do, but really you should remove the quotes.
> {dispText name="Name" value="$navItem.Name" label=$lblName
> readOnly=$navItem.readOnly}
>
Likewise,
value="$navItem.Name"
is not the same as
value=$navItem.Name
but is the same as
value="
$navItem.Name"
I'm not sure why a lot of PHP coders tend to put quotes around things
that don't need it (eg mysql_connect("$host", ...)) but it often causes
problems further down the line.
--
Mark Rogers
More Solutions Ltd :: 0845 45 89 555