PEAK XOOPS - un-well-known(?) usage of Smarty modifier (1) in englishin japanese

Archive | RSS |
XOOPS
XOOPS : un-well-known(?) usage of Smarty modifier (1)
Poster : GIJOE on 2006-07-09 17:53:50 (9512 reads)

in englishin japanese
You can use any functions as modifier for the Smarty.
(Not only plugins/modifier.*.php)

eg.
If you want to cut a multibyte-string, you have to use mb_strcut() instead of substr().
But you don't have to create and put a Smarty's modifier with mb_strcut().

Just write like this:


<{$news.title|mb_strcut:"0":"20"}>


To be continued ...

0 comments

Printer friendly page Send this story to a friend

Comments list

Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!