You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, sorry for late answer. Somehow missed your ticket. Technical is it not a problem. But you can't use it in Drupal this. So if you use inside your pattern it would not work in drupal.
Hi Christian,
currently it is not possible to use pattern lists with named keys.
e.g. for putting patterns inside the page.header, page.footer variables.
I didn't see any problem for allowing this.
Relevant code is:
wingsuit/packages/pattern/src/twigRenderEngine.ts
Line 95 in 68dfedb
delta is cast to a number here. this would have to allow strings also
wingsuit/packages/pattern/src/twigRenderEngine.ts
Line 98 in 68dfedb
previewRenderedVariables is initialised with an empty array. This would need to be an object if delta is a string.
Add object check in
wingsuit/packages/pattern/src/PatternVariant.ts
Line 151 in 68dfedb
This would allow to print
{{ page.header }}
in templates, but not{{ page }}
. Is that good enough?If that seems alright to you I'd like to create a pull request.
The text was updated successfully, but these errors were encountered: