This is my first time with Dynamic Placeholders and having a hard time getting started.
I have installed the package from here
and trying to render a component as
When browsing the page in preview mode, the error is
Sitecore.Mvc.Helpers.SitecoreHelper' does not contain a definition for 'DynamicPlaceholder and no extension method 'DynamicPlaceholder' accepting a first argument of type 'Sitecore.Mvc.Helpers.SitecoreHelper' could be found (are you missing a using directive or an assembly reference?)
If I just say,
@Html.Sitecore().Placeholder("section"), it works fine.
Using Sitecore 8.2 with MVC
Patrick Barron's answer worked. There are two parts to it:
In the /Views/web.config include the namespace
<add namespace="SitecoreExperienced.SitecoreControls" />
, and in the content editor, when adding the controls, append "_scexp1" to the placeholder name. eg:
1st Rendering: widgets
Placeholder key : section
2nd Rendering: banner
Placeholders : section_scexp1
3rd Rendering: banner
Placeholders : section_scexp2
section_scexp1and the net effect is that you cannot add any new placeholder "in between". It's a bit confusing to the content editors and means manually moving components at best.