smarty中如果使用数组变量
有一个多语言的模板,是从别的网上下的,可是不会写法。求助大家。
模板:tpl如下,其中,下面的格式有多个。
{{section name=sec1 loop=$PTL}}
<div id="submenual"><a href='{{$PTL[sec1].href}}' target="body" class="select-game-text" onmouseover="this.style.color='green';" onmouseout="this.style.color='black';" title="{{$PTL[sec1].title}}">{{$PTL[sec1].title|truncate:$word_length.TF:"...":true}}</a></div>
{{/section}}
数组我是这样写的
$PTL = array(
array("href" => "index.php?p=1, "title" => "我的博客"),
array("href" => "index.php?p=2, "title" => "站内短消息"),
array("href" => "index.php?p=3, "title" => "返回")
);
title的长度是不一样的。英文进去的时候,title写的是英文。
我想请问的模板里面的$word_length.TF,这个是什么意思,怎么才能写进去(前提是必须这样写)。