Flexible Content Item will be removed if there are no attributes set. #124
thoresuenert
started this conversation in
General
Replies: 1 comment
-
Hi @thoresuenert, Did you try using a custom resolver instead of providing the flexible's value by hand (in I'm not sure what is going on here, maybe I do not understand your use case right. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We have a use case where we want to map a flexible content block to a static template, in other words: There no Fields for that layout.
What is the reason behinde the
!$attributes
check in the following line:nova-flexible-content/src/Concerns/HasFlexible.php
Line 121 in 414de90
This leads to removal of the flexible content blocks with empty attributes
attributes: []
.When we remove the attributes check everything is fine, but i dont know if this introduce a bug somewhere else.
Code Example:
The database stores the following string for content:
[{"key": "cddb22bae645ec22", "layout": "module.menu", "attributes": [] }]
The following code does not render the view as aspected because
->flexibleContent()
is empty:Beta Was this translation helpful? Give feedback.
All reactions