nette/application — pull request #47 by zeleznypa (2014-12-17 11:36:07+00:00)
Title: LatteMacros: snippet rendering support for in template defined variables

Currently you can access `$template->getParameters()` defined in presenter/control in the snippet directly.

For example, if the `$template->getParameters()` contain `array('test' => 'value')`, you can access this variable in snippet directly:
```latte
{snippet test}
{dump $test}
{/snippet}
```

`$template` available in the latte is an object of `Latte\Template`, that is used to render current template. So when you set additional variable in this object, you can access this variable elsewhere in the same template and also in the snippets.

So when you have following code, everything work well.
```latte
{var $template->another_test = 'another value'}
{snippet test}
{dump $template->another_test}
{/snippet}
```

But all parameters from `$template->getParameters()` can be accessible directly,
```latte
{var $template->another_test = 'another value'}
{snippet test}
{dump $another_test}
{/snippet}
```
but except the in template defined.

This pull-request allow to define "in template global variable", than can be accessible directly in snippets like in the last example.

Also it resolve #46