I'm doing the Sitecore Cookbook and I have a question about the async feature. Is @Html.Sitecore.Placeholder("async-content") a sitecore convention name? Because I don't understand how that placeholder knows which component to accept/render.


Placeholder names can be what ever you want/need them to be. When adding a placeholder to a layout, you provide the placeholder key name, in this case async-content.

In Sitecore, You'll want to add a Placeholder item under /sitecore/layout/Placeholder Settings. The Placeholder Key field will be set to your async-contnet and the Allowed Controls is where you would set what components you want to allow in the placeholder.

enter image description here

Update Adding the placeholder item in Sitecore will allow you to add the controls in the Experience Editor. You can still add components to the placeholder without the placeholder item if you go through the Presentation Details (along with adding any component to the placeholder).

|improve this answer|||||
  • But the Sitecore Cookbook doesn't configure any placeholder setting. I know what you mean, but the book doesn't do that – Phoenix_uy Jun 16 '17 at 13:45
  • Updated answer. Technically, you don't have to add the Placeholder item, but if you don't you will only be able to add components through the Presentation Details and not through the Experience Editor – Patrick Barron Jun 16 '17 at 13:50
  • @PatrickBarron that is not entirely true, you can also enable components to be added to any placeholder by enabling (set to true) the setting WebEdit.PlaceholdersEditableWithoutSettings. However there will be no limitations on what renderings can be added to a placeholder if you enable that setting. – Dylan Young Jun 16 '17 at 15:10

this is not a Sitecore convention name, this is the just the name of a placeholder. I can see in the book that you mention they have a new device Async and they added a component on "async-content" placeholder. Please have a look how components are binded dynamically to a page: https://sdn.sitecore.net/upload/sitecore6/sc62keywords/presentation_component_reference_sc62_a4.pdf

enter image description here

|improve this answer|||||

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.