Re: [SMARTY] Using arrays as input to plugins
[email protected] (Mark Rogers) Thu, 27 Apr 2006 14:47:59 +0100
| Newsgroups | php.smarty.general |
|---|---|
| Organization | Quarella Ltd |
| Message-ID | <[email protected]> |
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