Quantcast
Channel: OutSystems Community
Viewing all articles
Browse latest Browse all 1476385

[Ideas] Handle nested placeholders to work with the ph class

$
0
0

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:

  1. Doesn't allow MovieContent itself to add content to ContentLayout's placeholder
  2. Does not generate a div inside ContentLayout's placeholder
  3. Allows the consumer of MovieContent to add content directly to ContentLayout's placeholder in the HTML output.



Viewing all articles
Browse latest Browse all 1476385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>