Skip to main content
Known Participant
July 29, 2024
Answered

Querying menu items in ID help menu

  • July 29, 2024
  • 3 replies
  • 655 views

Hi all,

I have two seperate plugins which is published by my company. What I simply need is to put our help links in the order of
Help -> My company |-> Plugin 1 Name -> Everything related to Plugin 1

                                       |-> Plugin 2 Name -> Everything related to Plugin 2

We are currently doing all these menu operations using "iMenuManager" in the SDK with addMenuitem and removeMenuitem etc. But as the menu paths are suppose to be in a PMString like "Main:&Help:My company:Plugin 1 Name:Everything related to Plugin 1", both of our products make their own entries for "My Company" menu item. (As they come from seperate code bases and are seperate plugins) 

So my menu looks like the below example instead of the above illustration that I have mentioned

Help -> |-> My company -> Plugin 1 Name -> Everything related to Plugin 1

               |-> My company -> Plugin 2 Name -> Everything related to Plugin 2

What I need, is to check if "My Company" entry is already in the help menu and if it's already there, add the other plugin related menu under already existing "My Company" menu.
Is there a way in the SDK to check if a certain menu item is aready available in the Help menu?

This topic has been closed for replies.
Correct answer Dirk Becker

For such menu items I would not bother the menu manager, you can use resources – ActionDef and MenuDef.

Do you localize the company name so the plugin specific key strings differ?

You can prefix the name with a period "." in the key string and omit the translation, instead of plugin specific localizable strings.

 

3 replies

Participant
August 8, 2024

You can use `IActionManager` to check if the "My Company" menu already exists. If it does, add the plugin-specific items under it instead of creating a duplicate.

 

This approach helps to maintain a clean and organized interface, similar to how you would manage menu prices (Menu Preise) to avoid redundancy and ensure that each item is appropriately categorized.

Participant
August 8, 2024

You can use `IActionManager` to check if the "My Company" menu already exists. If it does, add the plugin-specific items under it instead of creating a duplicate.

Dirk BeckerCorrect answer
Legend
July 29, 2024

For such menu items I would not bother the menu manager, you can use resources – ActionDef and MenuDef.

Do you localize the company name so the plugin specific key strings differ?

You can prefix the name with a period "." in the key string and omit the translation, instead of plugin specific localizable strings.

 

Known Participant
July 30, 2024

Hi @Dirk Becker,

Thanks for pointing me to the right direction.

It turned out that in our other product company name string was localised. I tested it without using the localised string and was able to achieve the desired functionality