un-well-known(?) usage of Smarty modifier (1)

Date 2006-07-09 17:53:50 | Category: XOOPS

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 ...





You can read more news at PEAK XOOPS.
http://xoops.peak.ne.jp

The URL for this story is:
http://xoops.peak.ne.jp/md/news/index.php?page=article&storyid=132