1
eikke
Smarty template string modifiers
  • 2004/2/2 13:09

  • eikke

  • Just popping in

  • Posts: 40

  • Since: 2004/1/15


I searched the forums, but couldn't find an answer on this: is it possible to use string modifiers in module template files? I tried it, but it seems not to work?

Like this:
<{$mystring|capitalize}>

Thanks!!!

2
Mithrandir
Re: Smarty template string modifiers

Yes, that should work.

if the module template is a SMARTY template, you should be able to use any SMARTY functions such as string modifiers.

Personally, I haven't had problems with this.

3
eikke
Re: Smarty template string modifiers
  • 2004/2/2 15:32

  • eikke

  • Just popping in

  • Posts: 40

  • Since: 2004/1/15


Found out some new thing:
It works on <{$test|capitalize}>, but not on <{$test2.item|capitalize}>. I dont even get an error if I d something like <{$test2.item|blablabla}>, dunno if I should get one tough.

Im running 2.0.6RC

Thanks, Ikke

4
Mithrandir
Re: Smarty template string modifiers

hmmmm... also weird. Should work, I think.

Try looking at the code for e.g. the new members block and see how it does it. I'm pretty sure it uses an approach similar to the one, you want.