I am going through Sitecore training and currently stuck on module working with component parameters

Here I am trying to change the number of spaces by passing through a parameter.

Here is my code and also an ss of how I am trying to add parameter through experience editor:

enter image description here enter image description here


2 Answers 2


Could you please add MaxCount, just like below code and in this link?

@Html.Sitecore().DynamicPlaceholder(new DynamicPlaceholderDefinition("placeholderkey")
        Count = 3,
        MaxCount = 9,
        Seed = 9,
        OutputModifier = (input, context) => new HtmlString("<div class=\"large-4 small-12 columns\">" + input + "</div>"),

also please confirm "ph_feature_spot_count" is a correct placeholder name.


Above issue got resolved once I changed the additional parameter name to below as the placeholder name was "feature-spot" and not "feature_spot"


The parameters must follow a specific format:

ph_placeholderKey_paramName where placeholderKey is the key in your code (customkey in last example) and paramName is the parameter name that will be passed through. Count is a special param name that defines the number of placeholders to generate.

ph_placeholderKey_indexNumber_paramName where indexNumber is the placeholder index number. This allows you to only pass specific parameters to specific placeholders, e.g. If you wanted to pass a different CSS Class to the second placeholder to make it “featured”. Keep in mind that the number is 0 based.

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

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.