CE6700 – Widget XY cannot contain widgets of type placeholder

0
hi,  Im using Mendix Studio Pro 10.24.9. im just getting started with the Mendix platform – so the error is probably on my side....    So im created some custom plugable Widgets with  "@mendix/pluggable-widgets-tools": "10.15.0".   One of the widgets i create has some Slots = property-type=="widgets".  <properties> <propertyGroup caption="Slots"> <property key="slotHeader" type="widgets" required="false" > <caption>header</caption> <description>Slot for the header</description> </property> <property key="slotDefault" type="widgets" required="false" > <caption>default</caption> <description>Slot for the content</description> </property> </propertyGroup> in a plain new project i was able to import the widgets and place it in a Layout. Put a "Main" placeholder in der "default"-slot and it just works.   But now i was moving to another project. where i wanted to integrate my new pluggable widgets. Now im getting an Error "C6700 – Widget XY cannot contain widgets of type placeholder". Even wen just created an new unused layout and added my widgets... as soon as i add the placeholder im getting this error.   What can i do to fix this?
asked
1 answers
1

A Mendix Placeholder can only be used in a Layout to define where page content goes. It is not a normal widget, so it cannot be placed inside another widget’s slot that allows child widgets. When you try to put a Placeholder into a pluggable widget slot, Studio Pro checks the rules and throws the C6700 error. You could try keeping the Placeholder in the Layout and placing your pluggable widget inside that Placeholder instead. If you need a reusable structure with editable content, use Layouts + Placeholders, and treat your pluggable widget as a normal widget inside the layout, not as something that contains a Placeholder itself.

answered