• Login
Community
  • Login

how to add a sub-submenu to the context menu?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 431 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    StoopidoMan
    last edited by StoopidoMan May 15, 2024, 1:47 AM May 15, 2024, 1:45 AM

    I am not an advance user or a coder.

    I want to edit the ContextMenu.xml, but I want to keep thing organized in sub menus

    So the first level would be “MyCustomMenu” then inside it I would have a submenu named “My Python Scripts”, and then inside My python scrip I would have a list of all my pythons scripts.

    Then Again in “MyCustomMenu” I would have another submenu for different plugins or shortcuts.

    I already checked this post:
    https://community.notepad-plus-plus.org/topic/17820/editing-the-file-context-menu-xml-how-to-add-a-submenu-to-the-context-menu

    and I was able to have a single level menu

    <Item id="0"/>
    
    <Item FolderName="My custom Menu" PluginEntryName = "Python Script" PluginCommandItemName = "scrip1" ItemNameAs = "Script1" />
    <Item FolderName="My custom Menu" PluginEntryName = "Python Script" PluginCommandItemName = "scrip2" ItemNameAs = "Script2" />
    
    <Item id="0"/>
    

    I tried to ask ChatGPT and got this

    <!-- Other context menu items -->
    <Item FolderName="My" PluginEntryName="Python Script" PluginCommandItemName="MyMainScript">
    <SubMenu name="MySubmenu" id="1">
    <Item FolderName="MySubmenu" PluginEntryName="Python Script" PluginCommandItemName="MySubScript1" />
    <Item FolderName="MySubmenu" PluginEntryName="Python Script" PluginCommandItemName="MySubScript2" />
    <!-- More sub-submenu items here -->
    </SubMenu>
    </Item>
    <!-- Other context menu items -->
    

    But it didn’t work.

    I have no idea what XML is, and searched everywhere .

    I just need a template to follow.

    E 1 Reply Last reply May 15, 2024, 6:10 AM Reply Quote 0
    • E
      Ekopalypse @StoopidoMan
      last edited by May 15, 2024, 6:10 AM

      @StoopidoMan

      Nope, there is only one level of indirection currently.

      S 1 Reply Last reply May 16, 2024, 9:08 AM Reply Quote 5
      • S
        StoopidoMan @Ekopalypse
        last edited by May 16, 2024, 9:08 AM

        @Ekopalypse

        Thank you very much

        1 Reply Last reply Reply Quote 0
        1 out of 3
        • First post
          1/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors