The best practice and most important approach of Sitecore development is separating responsibilities of “what to display” and “how to display”. Sitecore platform+ASP.NET MVC solution provides perfect separation between content data, function logic, and presentation experience. Sublayout and rendering in Sitecore define the content source, place holder and how the content been displayed. The parameters in rendering configuration is a very useful customization feature to allow content display in a way that user want. Here I’d like to illustrate how to create and use custom rendering parameters template. The sample shows capabilities within a Sitecore MVC solution to provide content authors the ability to customize the appearance of presentation components. The implementation of these capabilities involves configuration within Sitecore, c# code, and implementation of front end display logic to honour the configured parameters.
Instead of using rendering parameters name-value pairs, I’d like to standardize the parameters for Content Authors to avoid typo and also make configuration easier. Here is the custom rendering parameters template “Add Mobile Rendering Parameters” with two parameters built in: Show on Mobile Devices; Mobile Display Style
Change the rendering parameters template to the one created above.
Then configure the predefined parameters in page presentation details. Here is how the parameters been configured.
Based on these parameter values, the content will be showed on mobile device and rendered in scroll view style.