Re: [Tiki-devel] Assigning a value to a variable in Smarty template
Jonny Bradley via TikiWiki-devel <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks Luci, indeed, {$product.value} would be an element on an array called $product.
If in doubt try {$product|var_dump}
Also, {assign var="product" value="Tiki Wiki Support"} is the old Smarty 2 syntax, you can just do {$product='Tiki Wiki Support'} now, almost like a proper language ;)
More here https://www.smarty.net/docs/en/language.syntax.variables.tpl
jonny
> On 3 May 2021, at 17:58, luciash via TikiWiki-devel <[email protected]> wrote:
>
> Hi B,
>
> yes, I think you should use just {$product} (as I would do).
>
> {$product.value} indicates you want a value from an array which is the first letter in this case.
>
> Maybe you used it earlier with an array?
>
> Makes sense?
>
> luci
>
>
>
> On 03.05.2021 12:12, Bsfez Tiki via TikiWiki-devel wrote:
>> Hello,
>>
>> For months I used the following to assign a value to a variable in a smarty template so I can reuse it in a plugin list.
>>
>> IE:
>> {assign var="product" value="Tiki Wiki Support"}
>> So {$product.value} returned : Tiki Wiki Support
>>
>> Since a last (week ago +/-) Tiki22 update the value returned is just the initial of the value;
>>
>> Now {$product.value} return : T
>>
>>
>> That’s kind of weird… am I assigning the value in a wrong way or something ?
>>
>>
>> Bernard
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> TikiWiki-devel mailing list
>>
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
> _______________________________________________
> TikiWiki-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
_______________________________________________
TikiWiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel