Jump to content

Curious how to create 'navMenuOption'?


chef

Recommended Posts

chef

Like Statistics and AutoOrganize, I'm interested in how they are presented in the UI as a navMenuOption.

 

Looking through the plugin repositories, I'm not seeing where those options are added.

 

Is this an option which is specific to those plugins?

 

Thanks!

 

Ben

Link to comment
Share on other sites

PenkethBoy

namespace EmbyReports
{
    public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
    {
        public Plugin(IApplicationPaths appPaths, IXmlSerializer xmlSerializer)
            : base(appPaths, xmlSerializer)
        {
        }

        public override string Name => "Reports";


        public override string Description
            => "Generate Reports";

        public PluginConfiguration PluginConfiguration => Configuration;

        private Guid _id = new Guid("2FE79C34-C9DC-4D94-9DF2-2F3F36764414");
        public override Guid Id
        {
            get { return _id; }
        }

        public IEnumerable<PluginPageInfo> GetPages()
        {
            return new PluginPageInfo[]
            {
                new PluginPageInfo
                {
                    Name = "reports",
                    EmbeddedResourcePath = GetType().Namespace + ".Web.reports.html",
                    EnableInMainMenu = true
                },
                new PluginPageInfo
                {
                    Name = "reportsjs",
                    EmbeddedResourcePath = GetType().Namespace + ".Web.reports.js"
                }
            };
        }
    }
}

is this what you are looking for?

Edited by PenkethBoy
Link to comment
Share on other sites

chef

Yes, enable in main menu.... right ... I had missed that in the Auto organize plugin class.

 

That is great.

 

Thank you, sir,  very much.

Link to comment
Share on other sites

chef

Is this editable at all to show something other than a folder?

<i class="md-icon navMenuOptionIcon">folder</i>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...