4

What is the difference between "Component definition item" and "Components or Rendering" in Sitecore?

5

A rendering is more than a component definition item. it consists of a definition item in Sitecore and a file on the file system.

A view rendering is the simplest Sitecore MVC rendering type. As with all presentation items in Sitecore, a view rendering consists of a definition item in Sitecore and a file on the file system. In the case of view renderings, the file is a standard Razor view (.cshtml) which expects a model of type RenderingModel by default (but can be configured to use a custom class). The model is assembled by the Sitecore MVC pipeline - you do not create a controller and ActionResult as you would with standard ASP.NET MVC. For this reason, controller renderings may be a better choice for complex business logic .

http://sitecore-community.github.io/docs/sitecore-mvc/view-renderings/

A controller rendering is an advanced component type that allows you to specify a controller and an action on the component definition item. The action must return a result that can be rendered - such as a view. The controller itself does not need to inherit from a Sitecore-specific class - it is just a normal MVC controller.

http://sitecore-community.github.io/docs/sitecore-mvc/controller-renderings/

| improve this answer | |
  • Thanks! for reverting.So can i say that the purpose of a component definition item is to allow the component to be added to a placeholder or it stores the rendering parameters of the component ? I – Mstech May 16 '17 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.