Altering rendering behavior using component properties
Sitecore provides you with different component properties such as data sources, rendering parameters, and so on. By default, the context item becomes data source for the component. By passing data source, we can change the behavior.
In this recipe, we will create a rendering to list products on the products' landing page. We will reuse the rendering on the home page to show a limited number of products with a different look and feel.
Getting ready
In the first chapter, we created the Product Category
and Product
templates having Common Fields
as a base template, which contains fields such as the title, body, and image. Make sure that you created multiple product categories and products inside ...
Get Sitecore Cookbook for Developers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.