Created
January 25, 2013 01:43
-
-
Save ginsterbusch/4630881 to your computer and use it in GitHub Desktop.
smarty template to test whether modifiers are allowed to be used in if-else-clauses or not.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{assign var="strPreis" value='133,00'} | |
<html> | |
<head> | |
<title>formatting test</title> | |
</head> | |
<body> | |
<p>replacement test: {if $strPreis|replace:',':'.' == '133.00'} | |
works! | |
{else} | |
fucks up .. as usual. | |
{/if}</p> | |
<p>formatting test: {if $strPreis|string_format:'%1.1s' == '1'}works{else}sucks.{/if}</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment