Skip to content

Commit 3aa93e0

Browse files
committed
latte v3.1.5
1 parent 82d1bfc commit 3aa93e0

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

latte/cs/template-inheritance.texy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ Kód v hlavičce podřízené šablony (tj. před prvním blokem nebo jakýmkoli
105105
...
106106
```
107107

108+
Pokud chcete proměnné předat pouze layoutu, aniž by vznikly v aktuální šabloně, uveďte je přímo v tagu `{layout}` (nebo `{extends}`) za čárkou: .{data-version:3.1.5}
109+
110+
```latte
111+
{layout 'layout.latte', robots: noindex}
112+
```
113+
114+
Proměnná `$robots` bude dostupná v layoutu a jeho blocích, ale nikoli v blocích aktuální šablony. Explicitně předaná proměnná má také přednost před stejnojmenným parametrem šablony.
115+
108116

109117
Víceúrovňová dědičnost
110118
----------------------

latte/en/template-inheritance.texy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ Code in the header of the child template (that is, before the first block or any
105105
...
106106
```
107107

108+
If you want to pass variables only to the layout, without creating them in the current template, list them directly in the `{layout}` (or `{extends}`) tag after a comma: .{data-version:3.1.5}
109+
110+
```latte
111+
{layout 'layout.latte', robots: noindex}
112+
```
113+
114+
The variable `$robots` will be available in the layout and its blocks, but not in the blocks of the current template. An explicitly passed variable also takes precedence over a template parameter of the same name.
115+
108116

109117
Multilevel Inheritance
110118
----------------------

0 commit comments

Comments
 (0)