3

I have Editable check-box checked at all the required places and have related settings. The problem appears when clicked on Add to here button and it pops up Select a Rendering empty window.

enter image description here

I have spent hours to figure this out but still no luck. Looking forward to your thoughts on this. Thanks!

  • Do you have a number of Placeholder items?? and Is it supposed to show only allowed controls? – Jihyun Dec 6 '16 at 21:34
5

You must have a Placeholder Settings item that has Renderings selected in the Allowed Controls field. The selected Renderings must also be marked as Editable.

The Placeholder Settings item must have the placeholder name in the Placeholder Key field or assigned to the placeholder name in the Presentation on the __Standard Values of the page template.

Dynamic Placeholders

If you are using a Dynamic Placeholder implementation, make sure it has properly implemented it's own version of the GetAllowedRenderings pipeline processor. This pipeline processor (found in the GetPlaceholderRenderings portion of the pipeline) is responsible for building the list of Renderings to display when clicking the "Add to here" button in Experience Editor.

So, for instance, if we have a custom processor called GetDynamicKeyAllowedRenderings , the processor code may look something like this:

public class GetDynamicKeyAllowedRenderings : GetAllowedRenderings
{
    public new void Process(GetPlaceholderRenderingsArgs args)
    {
        Item placeholderSettingsItem = null
        // Figure out if this is a dynamic placeholder 
        // and get the proper placeholder settings item from Sitecore.
        ....

        List<Item> allowedRenderings = null;
        if (placeholderSettingsItem != null)
        {
            bool flag;
            args.HasPlaceholderSettings = true;
            // Get the list of allowed renderings for this placeholder
            allowedRenderings = GetRenderings(placeholderSettingsItem , out flag);
            if (flag)
            {
                args.CustomData["allowedControlsSpecified"] = true;
                // If GetRenderings returns a list of renderings to display, this must be set to false.  
                // If set to true, the Allowed Renderings pane will always show the tree view.
                args.Options.ShowTree = false;
            }
        }

        if (allowedRenderings == null) return;

        if (args.PlaceholderRenderings == null)
        {
            args.PlaceholderRenderings = new List<Item>();
        }
        args.PlaceholderRenderings.AddRange(allowedRenderings);
    }
}

The key to the code above, is to set args.Options.ShowTree = true if there are renderings to display. If this remains false, it will always show the tree view (as seen in the screenshot in the question).

| improve this answer | |
  • I do already have this settings in place. – V J Nov 9 '16 at 15:27
  • @Vivek Did you managed to solve the issue? I mean this is pretty straight forward to set, but somehow i too face the same issue on our Dev server but not on local. – Jaydeep Dec 7 '17 at 9:54
2

The only way for you to get the allowed renderings to show on the pop-up is setting them into placeholder settings. Placeholder settings is a way for you to tell Sitecore what are the allowed renderings a content author can pick when adding a component to a page. to do that you need to create a new placeholder settings under Layouts/Placeholder Settings and select on the Allowed Controls field which ones are allowed for that placeholder. you need also to make sure that the key field on the placeholder settings is consistent with the one you are using as well as you need to set on the renderings whether they are Editable. To do that open the rendering under Layouts/Rendering/The path to your rendering and select the rendering. Look for the field Editable and make sure that it is checked. More on placeholder settings here

| improve this answer | |
  • I do already have this settings in place. looking for solution that someone might have faced after applying all necessary settings. – V J Nov 9 '16 at 15:29
  • This is pretty much the way to do it. you need to isolate this problem. Have you tried this in a vanilla instance? Do you see any useful information on the logs? – Diego Nov 9 '16 at 15:33
  • The problem disappears if I reinstall the placeholder settings and surprisingly it works for 24 hours. So, suspecting if its being cached somewhere for a day. No useful info in the log. What is Vanilla instance? – V J Nov 9 '16 at 15:37
  • a vanilla instance is an out of the box sitecore instance. What exactly you mean by reinstall the placeholder setting? Are you deploying it to another sitecore instance? – Diego Nov 9 '16 at 15:40
  • Also, it does work absolutely fine in development environment, the problem appears in staging and higher environments. – V J Nov 9 '16 at 15:57

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.