In OutSystems, we can make flexible layouts with the ph
class, which adds display: none
to the element if it's contents are empty.
However, if we want to add a placeholder to another placeholder, the ph
class applied to the outer placeholder wont' work if the inner placeholder is empty, as the inner placeholder creates it's own div element inside the outer placeholder. So now the outer placeholder is no longer empty. We also can't hide a parent element in CSS based on it's children (except for :empty!).
Here, the only purpose of MovieContent's Actions placeholder is to expose ContentLayout's Actions placeholder.
This is what it currently generates in HTML. Outer (ContentLayout) placeholder's content is no longer empty here, even if Inner (MovieContent) placeholder has no content.
One idea I can think of is to add a configuration property when selecting a consumed Placeholder in the widget tree that in this example:
- Doesn't allow MovieContent itself to add content to ContentLayout's placeholder
- Does not generate a div inside ContentLayout's placeholder
- Allows the consumer of MovieContent to add content directly to ContentLayout's placeholder in the HTML output.