This is my first time with Dynamic Placeholders and having a hard time getting started.
I have installed the package from here
https://marketplace.sitecore.net/en/Modules/I/Integrated_Dynamic_Placeholders.aspx
and trying to render a component as
@Html.Sitecore().DynamicPlaceholder("section")
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
SOLUTION:
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_scexp1
and 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.