Skip to content
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

Dynamic snippet check for static snippet parent should be implemented in Runtime #134

Closed
hrach opened this issue Sep 4, 2016 · 3 comments

Comments

@hrach
Copy link
Contributor

hrach commented Sep 4, 2016

Currently, if a dynamic snippet is used without {snippet} or {snippetArea} parent, an exception is thrown. However, such behavior disables using dynamic snippets through define blocks, etc.

{define row}
  <div n:snippet="row-{$id}">{$id}</div>
{/define}

{snippet}
  {include row id => 1}
{/snippet}

This check could be moved into Runtime or more complex check could be implemented, but this could be pretty difficult.

@matej21
Copy link
Contributor

matej21 commented Sep 4, 2016

..or we could simply add support for a |nocheck modifier.

@hrach
Copy link
Contributor Author

hrach commented Sep 4, 2016

Personally, I don't like these modifiers that disables some check. What if there will be more checks? Will be there an option not to disable them all?

@matej21
Copy link
Contributor

matej21 commented Sep 4, 2016

What if there will be more checks?

good point.

Or we could entirely remove that check. It was primary needed for this (for the $parent variable), but now, dynamic = true parameter is not used anymore.

dg added a commit that referenced this issue Nov 16, 2020
@dg dg closed this as completed Nov 16, 2020
dg added a commit that referenced this issue Nov 16, 2020
@dg dg mentioned this issue Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants