-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing way to use control constants as snippet/snippetArea name #141
Comments
That probably means the code has to be wrapped in {snippet}
{form \Vendor\App\ExampleForm::CONTROL_FORM}
<div n:snippet="$form::SNIPPET_FORM">
{input $form::CONTROL_SUBMIT}
</div>
{/form}
{/snippet} Could you try that? |
This was just an example. We need to redraw the specific part, not the whole control. {form \Vendor\App\ExampleForm::CONTROL_FORM}
<div n:snippet="$form::SNIPPET_FORM">
{input $form::CONTROL_SUBMIT}
</div>
<div n:snippet="$form::SNIPPET_WE_DONT_WANT_REDRAW">
{* some big satic data *}
</div>
{/form} |
It is dynamic snippet, because value of ping @matej21 |
$form|$control is uknown, but we can use static constant like this, but it also doesn't work, because the {form \Vendor\App\ExampleControl::CONTROL_FORM}
<div n:snippet="\Vendor\App\ExampleForm::SNIPPET_FORM">
{input \Vendor\App\ExampleForm::CONTROL_SUBMIT}
</div>
{/form} |
Possible solution is to pass variable |
I have test this, but it's not working. Same Error as above with this tests:
or
My packages are:
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 |
We are using control constants to define control names for better orientation in the project code. Unfortunately currently there is no way to do same thing with the snippet. For example:
or
This example unfortunately will throw the following exception:
Dynamic snippets are allowed only inside static snippet/snippetArea.
The text was updated successfully, but these errors were encountered: