Skip to content

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

@micha-walter

Description

@micha-walter

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions