Difference between static binding and dynamic binding in sitecore

Prem Murmu on 1/19/2021 3:55:13 PM

Static binding
Dynamic binding
Static binding means adding a rendering to a page in a static way or raw way.
Dynamic binding means that you will have a placeholder to put your renderings into  on a page.

 In an mvc view: 

@Html().RenderAction("Controller", "Action");

In an mvc view:

@Html().Sitecore().Placeholder("main")

We are not able to change rendering without editing the code.
We will be able to "dynamically" add any rendering.
Use static bindigs for things like site header rendering, etc (something that should not be removed by editors mistake and is not supposed to be changed).
Use dynamic bindings, because of their flexibility.It is supposed to used where content or any component rendering is to be rendered dynamically.

0 Comments on this post

Comments(0)||Login to Comments


InterServer Web Hosting and VPS
  • see more..