Releases: dermatthes/text-template
Releases · dermatthes/text-template
Added return value append redirection
Return values of functions and sections can now be appended to the context:
{print >> var1}A{/print}
{print >> var1}B{/print}
Result: {=var1}
The output would be Result: AB
Added sections
Added
- section feature
Shortened syntax and easier debugging
- Shortened Syntax
{if someVar}
or{if !someVar}
to check a variable is/is not set (MartinMystikJonas) - Fixed stripping newlines (MartinMystikJonas)
- Added UndefinedVariableException
Bugfix release
- Fixed: Wrapping of '{' #8
- Added: Plugins
Improvements
- Multiline support
- If / else
- break
- user-defined functions
Refactored code, uses nette/tester, changed namespace
The Namespace changed from de\leuffen\text_template
to Leuffen\TextTemplate
Added {else} and {elseif} to if - constructs
Now this works
{if name='abc'}
Say something
{elseif name='cda'}
Say all
{else}
Say nothing
{/if}