Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Hi,
I think there is a setting named SortOrder. Just try to set suitable value for SortOrder to display in the order that you want.
Looking at the CMS 12 docs -- https://docs.developers.optimizely.com/content-management-system/docs/plugging-in-a-gadget
Are you using PlugInArea == "AssetsPanel"?
Did you try to set SortOrder and PlugInAreas as following:
[Component]
public class CustomComponent : ComponentDefinitionBase
{
public CustomComponent ()
: base([yourWidgetType])
{
//...
base.SortOrder = 200;
base.PlugInAreas = new string[1] { PlugInArea.AssetsDefaultGroup };
//...
}
}
Hm.
I have testet all different values for the SordOrder and the PluginAreas.
Sometimes when I compile when I use PlugInAreas = ["AssetsPanel"]; It is added as expected, but with next compile it is separated again.
My component:
```
[Component]
public class VoiceSubscriptionContentPaneNavigationComponent : ComponentDefinitionBase
{
public VoiceSubscriptionContentPaneNavigationComponent() : base("epi-cms/component/SharedBlocks")
{
SortOrder = 200;
PlugInAreas = ["AssetsPanel"];
Categories = ["cms"];
Title = "Abonnementer";
Settings.Add(new Setting("repositoryKey", Constants.RepositorySettings.VoiceSubscriptionContentRepositoryKey));
}
}
```
Hi, when you use PlugInArea, you need to sort it.
I did it for settings
public class PlugInArea
{
public const string Assets = "/episerver/cms/assets";
public const string AssetsDefaultGroup = "/episerver/cms/assets/defaultgroup";
public const string NavigationDefaultGroup = "/episerver/cms/mainnavigation/defaultgroup";
public const string Navigation = "/episerver/cms/mainnavigation";
protected PlugInArea();
}
then call your plugin
[Component]
public sealed class GlobalSettingsComponent : ComponentDefinitionBase
{
public GlobalSettingsComponent()
: base("epi-cms/component/MainNavigationComponent")
{
LanguagePath = "/episerver/cms/components/globalsettings";
Title = "Site settings";
SortOrder = 1000;
PlugInAreas = new[] { PlugInArea.AssetsDefaultGroup };
Settings.Add(new Setting("repositoryKey", value: GlobalSettingsRepositoryDescriptor.RepositoryKey));
}
}
Thanks for all help!
After trying a lot it was the code
```
SortOrder = 11000;
PlugInAreas = PlugInAreas = new[] { PlugInArea.AssetsDefaultGroup };
```
And reset view that fixed the issue. I don't know why I need to add so big sortorder.
Hi. I have created a gadget that I want to appear as a new tab in the assets panel beside the Blocks and Media tabs
For a simple test I testet the example from this url: docs.developers.optimizely.com/content-management-system/v11.0.0-cms/docs/creating-a-component-1