Question

I have the following code, the button is shown but the dropdownlist is not visible. I think the problem is with templatealias, but I dont understand very well how this thing works

Was it helpful?

Solution

I've tested your XML - you've used the group size "LargeLarge" from the Flexible2 template that dropdown isn't capable to support:

Microsoft JScript runtime error: The display mode with name: Large is not valid for this control with id: SP.WikiActions.FolderDropdown

I've changed the MaxSize to MediumMedium (if you check the Flexible2 template in CMDUI.xml - it contains three rows of the small controls) and all have rendered correctly:

<MaxSize Id="SP.WikiActions.MaxSize"
                   Sequence="11"
                   GroupId="SP.WikiActions"
                   Size="MediumMedium" />

So you need to use as the scaling to your dropdown group any scaling that contains modes supported by dropdown.

BTW here's a recomendation for using templates in your custom groups:

When defining custom groups in ribbon customization Features, Microsoft recommends that developers create their own group template instead of using one of the provided group templates. The reason for this is that SharePoint does not load the entire ribbon for every page request; only the parts of the ribbon that are needed for the current context are loaded. This includes the group templates. Therefore, if developers rely on the built-in group templates, there is a chance the template will not be loaded for the current page and their ribbon customizations will not appear.

UPDATE: Here's the walkthrough that includes a group template creation. I'm planning to cover this things in deep details myself but need some time to do it. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top