Created
September 25, 2012 11:27
-
-
Save peschmae/3781226 to your computer and use it in GitHub Desktop.
inline printf ViewHelper
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
<f:format.printf arguments="{number: '{singleDigitToDisplayWithLeadingZero}'}">%1$02d</f:format.printf> | |
How can that be written inline? | |
Possible Workaround (Ugly, since we need to set the format in the controller) | |
Controller: | |
<?php | |
$this->view->assign('monthFormat', '%1$02d'); | |
?> | |
View: | |
{monthFormat-> f:format.printf(arguments: {1:'{singleDigitToDisplayWithLeadingZero}'})} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment