Re: [SMARTY] Using arrays as input to plugins

Mark Rogers <[email protected]>
Newsgroups gmane.comp.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

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.