nette/latte

Missing way to use control constants as snippet/snippetArea name (reopen)

micha-walter opened this issue · 1 comments

I have test this, but it's not working. Same Error as above with this tests:

<div n:snippet="\Vendor\App\ExampleForm::SNIPPET_FORM">

or

{var $formName = Vendor\App\ExampleControl::class}
<div n:snippet="$formName::SNIPPET_FORM">

My packages are:

latte/latte: v3.0.9
nette/application: v3.1.13

Is there a chance that this will be supported in the future?

I used the constants in my code to redraw the controls, so the strings of n:snippet in template and $this->getComponent(\Vendor\App\ExampleForm::SNIPPET_FORM)->redrawControl() in Presenter should always the same.

Originally posted by @micha-walter in #141 (comment)

dg commented

The constant notation should work now.