Sitecore / ASP.NET-Core-SDK

The official open source ASP.NET Core SDK for Sitecore DXP and XM Cloud.
https://sitecore.github.io/ASP.NET-Core-SDK/
Apache License 2.0
9 stars 5 forks source link

Fixed issue rendering nested empty placeholders #6

Closed robearlam closed 3 months ago

robearlam commented 3 months ago

Currently, empty Placeholders are not rendering the same HTML that JSS does. This PR updates the SDK's TagHelper to generate HTML that matches the same output from JSS.

Description / Motivation

When a Placeholder is rendered without any components loaded inside of it, it needs to be wrapped in a div to be correctly rendered in Pages and Experience Editor. The div being created by for this SDK is <div className=\"sc-empty-placeholder\"></div>

Testing

Terms