1

I'm working with Sitecore MVC. I have a problem with my sitecore html helper. when I call @Html.Sitecore().DynamicPlaceholder("placeholderKey") it will work successfully but, when I try adding some arguments it will not work.

Error message : No overload for method 'DynamicPlaceholder' takes 3 arguments.

It just the DynamicPlaceholder with single argument works other overloading methods won't.

Please help me. It's been a struggle.

My Sample use of Dynamic Placeholder :

enter image description here

Output screenshot :

enter image description here

3
  • Note : even this line is error @Html.Sitecore().DynamicPlaceholder("feature_spot", CreateDivWrap(), 3) Commented Mar 29, 2019 at 7:14
  • Which Sitecore version you use?
    – Marek Musielak
    Commented Mar 29, 2019 at 7:25
  • I'm working with Sitecore 8.2 Commented Mar 29, 2019 at 8:43

1 Answer 1

1

Sitecore Dynamic Placeholders were introduced in Sitecore 9. You can read about it e.g. here:

https://jammykam.wordpress.com/2017/10/17/sitecore-9-dynamic-placeholders/

As you wrote in your comment, you're using Sitecore 8.2.

It means that you're using some custom implementation of Dynamic Placeholders and you're trying to use methods which are only in Sitecore 9 ( https://doc.sitecore.com/developers/90/sitecore-experience-management/en/dynamic-placeholders.html ). That's why you see compilation errors.

5
  • 1
    I am deleting my answer because doesn't bring any value.is funny we post same link . Commented Mar 29, 2019 at 9:44
  • Kamruz blog post is so famous that it gets very high in Google search results :)
    – Marek Musielak
    Commented Mar 29, 2019 at 9:49
  • Thanks, a lot. I hope I can find a way to custom implement the Dynamic Placeholder. Commented Mar 29, 2019 at 9:50
  • Marek Musielak, Why I'm getting a suggestion of DynamicPlaceholder overload menthods ? but, when i run the site it will display the same error.. Commented Apr 2, 2019 at 9:22
  • I can only suspect that the referenced dlls and dlls in bin folder don't match. There is no way to validate that without sitting in front of your laptop
    – Marek Musielak
    Commented Apr 2, 2019 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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