I'm working on the truncate modifier.
{ $strVariable|truncate }
{ $strVariable|truncate:intLength }
Truncate will end a string variable's output to a character length. If no length is given, the default intLength value is 80. It will try to cut off at a word boundary before the intLength value. Smarty's truncate has some additional optional parameters, but I don't think I'll be able to implement it fully very soon. So, I'll just implement the length parameter, for now.
Also, I'm going back and forth regarding implementing dynamic includes in Dermis. The difficulty is that Dermis would have to determine if the .tpl.file needs to be compiled at every occurrence of an {include} tag. If it is, this means that the Dermis compiler would need to be invoked. Therefore, the Dermis code would need to be #included once the script begins.
Tuesday, November 24, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment