|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
djik Smarty n00b
Joined: 12 Nov 2012 Posts: 1
|
Posted: Mon Nov 12, 2012 3:04 pm Post subject: Help for newbie |
|
|
Hello guys,
I begin to working with PIWIK. This service can of develop plugin with SMARTY.
In a Exemple's plugin, I find this command :
Code: | {$foo|truncate:"`$fooTruncCount/$barTruncFactor-1`"} |
I don't understand. Someone can explain me, what do it means ?
thanks for your help |
|
Back to top |
|
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
Posted: Mon Nov 12, 2012 3:13 pm Post subject: Re: Help for newbie |
|
|
djik wrote: | Hello guys,
I begin to working with PIWIK. This service can of develop plugin with SMARTY.
In a Exemple's plugin, I find this command :
Code: | {$foo|truncate:"`$fooTruncCount/$barTruncFactor-1`"} |
I don't understand. Someone can explain me, what do it means ?
thanks for your help |
truncate is a modifier:
http://www.smarty.net/docs/en/language.modifier.truncate.tpl
The first parameter after the : indicates how many chars to truncate to.
the backticks ` indicate that the expression $fooTruncCount/$barTruncFactor-1
will be evaluated, so, $foo will be truncated to $fooTruncCount/$barTruncFactor-1 characters |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|