Try our conversational search powered by Generative AI!

Assets PlugIn Doesnt Show Up

Vote:
 

Im trying to create a plugin that will show up in the assets pane in Optimizely 12, and its not showing up. I have a component set up below, but its not visible:

 [Component]
    public sealed class MyComponent : ComponentDefinitionBase
    {
        public GlobalSettingsComponent()
            : base("epi-cms/component/MainNavigationComponent")
        {
            this.LanguagePath = "/episerver/cms/components/myComponent";
            this.Title = "My Component";
            this.SortOrder = 1000;
            this.PlugInAreas = new[] { PlugInArea.Assets };
            this.Settings.Add(new Setting("repositoryKey",MyComponentRepositoryDescriptor.RepositoryKey));
        }
    }

[ServiceConfiguration(typeof(IContentRepositoryDescriptor))]
    public class MyComponentRepositoryDescriptor: ContentRepositoryDescriptorBase
    {
        public static string RepositoryKey => "mycomponent";

        public override IEnumerable<Type> ContainedTypes => new[] { typeof(CustomClass), typeof(CustomFolder) };

        public override IEnumerable<Type> CreatableTypes => new[] { typeof(CustomClass), typeof(CustomFolder) };

        public override string CustomNavigationWidget => "epi-cms/component/ContentNavigationTree";

        public override string CustomSelectTitle =>
            LocalizationService.Current.GetString("/contentrepositories/mycomponent/customselecttitle");

        public override string Key => RepositoryKey;

        public override IEnumerable<Type> MainNavigationTypes => new[] { typeof(CustomClass), typeof(CustomFolder) };

        public override IEnumerable<string> MainViews => new string[1] { HomeView.ViewName };

        public override string Name =>
            LocalizationService.Current.GetString("/contentrepositories/mycomponent/name");

        public override IEnumerable<ContentReference> Roots => new[] { this.MyClass.Service.GlobalRoot};

        public override int SortOrder => 1000;

        private Injected<ICustomClass> MyClass{ get; set; }
    }
#276669
Mar 18, 2022 14:51
Vote:
 

Hi Ethan, did you ever figure out why the component didnt show? I am having the same issue.

#297409
Feb 28, 2023 11:44
Vote:
 

Thomas - 

Sort of. I think there is some sort of cache issue I dont understand. BUT, to fix, go to the little person icon in the top right of the CMS and click on it. You get two options: My Settings and Log Out. Go to My Settings. Click on Reset Views. Give it a sec to process - you should get a confirmation when its done. That should fix your problem if your code is actually correct.

#297412
Feb 28, 2023 13:58
Tim Schmelter - Apr 20, 2023 19:08
Thanks, works
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.