Posts

Showing posts from December, 2021

Checkbox Rendering Parameter Taking Null Value If It's Unchecked

Image
Issue: I have a client requirement that each component should be flag-based to turn it on or off. I have used a checkbox in rendering parameters for the implementation of this functionality and applied that rendering parameter template on each component rendering. While reading these values, If I checked the Checkbox IsComponentVisiable it returns "1" and unchecked the Checkbox, it returns me null. var flag= RenderingContext.Current.Rendering.Parameters["IsComponentVisible"] I was surprised about its behaviour that instead of "0" it returns null? I raised the support ticket to Sitecore to understand that am I doing something wrong or if it's the default behaviour of the checkbox field when we use it as the rendering parameter? Sitecore suggested: Find below the Sitecore Team Response on my Ticket: Based on the provided information we would like to define the scope of the current case: Issue def