latte
latte copied to clipboard
☕ Latte: the safest & truly intuitive templates for PHP. Engine for those who want the most secure PHP sites.
I just finished first draft of script that uses PHPStan to satic analysis of compiled Latte templates in our projects. One think I noticed is that {varType} or {templateType} macros...
Version: 2.9.2, 2.10.0 ### Bug Description Parser throws: `Latte\CompileException: Cannot redeclare block 'someBlock' in ...` ### Steps To Reproduce Run Latte with this code in a template file: ```latte {define...
Version: 2.10.3 ### Steps To Reproduce ~~~latte {foreach [1, 2, 3] as $item} {skipIf $item === 3} {$item}{sep}, {/sep} {/foreach} ~~~ https://fiddle.nette.org/latte/#14e8be81e2 ### Expected Behavior The last comma should not...
Version: dev-master 505c0b1 ```html {define inputSubmit $ctrl, $full, $class} {dump} {/define} ``` Works: ```html {include inputSubmit $form[send], false, 'btn btn-secondary no-push'} ``` class => 'btn btn-secondary no-push' Not: ```html {include...
- bug report? yes - feature request? no - version: 2.4.5 **Description/Steps to reproduce** `` produces following output `
Currently Latte does only provide a `FileLoader` which allows to bind templates to a single directory. I think it would be great if Latte would provide additional Loader which allows...
### Bug Description As discussed [in this thread](https://forum.nette.org/en/35359-is-it-possible-to-get-rid-of-noescape) it is not possible to return markup that does not need the |noescape filter when used inside an HTML tag. Description of...
Version: 3.0.13 earlier versions probably too - related issue: #345 ### Bug Description `{$this->hasBlock('test')}` yields different result than `{hasBlock('test')}`. Relevant code: - https://github.com/nette/latte/blob/462444d669809528b6f6ce191b616d747c9b4bfc/src/Latte/Essential/CoreExtension.php#L194 - https://github.com/nette/latte/blob/462444d669809528b6f6ce191b616d747c9b4bfc/src/Latte/Runtime/Template.php#L379-L382 When using `{$this->hasBlock()}` the `LayerTop`...
Version: 3.0.13 ### Steps To Reproduce https://fiddle.nette.org/latte/#324e7f85db ``` {define foo} abc {/define} {contentType html} ahoj {include foo} ``` ### Bug Description With this code I'm getting `Latte\RuntimeException Including block foo...
- bug fix / new feature? #314 - BC break? no - doc PR: nette/docs#??? This introduce a namespace loader. This allows to use a namespace like `app::` similar to...