Page 1 of 1

smarty |upper in cmsms? [solved]

Posted: Thu Feb 22, 2007 9:55 am
by pumuklee
hi
i want to ask how can i upper case a variable

i use something like this
{capture assign="lang_lang"}{lang_id}_{lang_id|upper}{/capture}

and teh lang_id is something like this de, fr, it...

my final value must be lang_lang = de_DE...

the problem is this smarty directive |upper doesnt work for me, it returns always de_de not de_DE

any ideea?
thanks

Re: smarty |upper in cmsms?

Posted: Thu Feb 22, 2007 10:41 am
by pumuklee
hi
i found the solution

the smarty upper it works
but for me in this way

{capture assign="langval"}{lang_id}{/capture}
{capture assign="lang_lang"}{lang_id}_{$langval|upper}{/capture}

by me it was the problem that {lang_id} is a user defined tag
so i think that {UDT|upper} it doesn't work
must be so {$variable|upper}

thats all folks

Re: smarty |upper in cmsms?

Posted: Thu Feb 22, 2007 10:49 am
by cyberman
pumuklee wrote: so i think that {UDT|upper} it doesn't work
This must be the explanation - have tried it with {title} and it works ... don't know if this is a bug or a featureĀ  ::).