List Info

Thread: Assign by ref issue




Assign by ref issue
user name
2007-05-18 09:23:52
I have an Image object that I have assigned by ref to my
template.  So 
far so good, until I try to pass an array as an argument to
one of the 
object's methods:

{$Image->resize($data.Inventory.image1, 124, null, true,

array('border'=>1))}

The call works fine without the array, but with it, I get:


Fatal error: Smarty error: [in offer.tpl line 27]: syntax
error: 
unrecognized tag: $Image->resize($data.Inventory.image1,
124, null, 
true, array('border'=>1)) (Smarty_Compiler.class.php,
line 439)

Any ideas?

-Erich-

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


Re: Assign by ref issue
user name
2007-05-18 09:54:22
Its a syntax limitation, you need to supply your array as a
variable to 
the argument, or create a modifier that will assemble an
array for you.

Erich C. Beyrent wrote:
> I have an Image object that I have assigned by ref to
my template.  So 
> far so good, until I try to pass an array as an
argument to one of the 
> object's methods:
>
> {$Image->resize($data.Inventory.image1, 124, null,
true, 
> array('border'=>1))}
>
> The call works fine without the array, but with it, I
get:
>
>
> Fatal error: Smarty error: [in offer.tpl line 27]:
syntax error: 
> unrecognized tag:
$Image->resize($data.Inventory.image1, 124, null, 
> true, array('border'=>1))
(Smarty_Compiler.class.php, line 439)
>
> Any ideas?
>
> -Erich-
>

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )