- Code: Select all
# Supports Organizer.rb
$submenu ? (organizer = $submenu) : (organizer = UI.menu("Plugins"))
organizer.add_item("ItemName") { action }
$submenu is the global variable used by Organizer as it traverses the folders located in the Plugins folder. It creates a submenu consisting of the folder name, then adds the scripts in that folder to the submenu. Scripts can have their own submenus as well:
- Code: Select all
# Supports Organizer.rb
$submenu ? (organizer = $submenu) : (organizer = UI.menu("Plugins"))
submenu=organizer.add_submenu("Name")
submenu.add_item("ItemName1") { action }
submenu.add_item("ItemName2") { action }
submenu.add_item("ItemName3") { action }
Please note, the beginning comment line is important - it prevents the organizerEdit script from trying to automatically edit the script to make it compliant. It can exist at the beginning of the file to speed the process.
There is also a mechanism for developers to easily exclude their subfolders so Organizer will not try to load the contents of those folders. This should result in a smoother experience for users, who won't have to contend with manually maintaining the excluded folders list in the SmustardOrganizerExcludeFolders.txt file.
To do this: in your subfolder, create an empty text file called "exclude.txt" - that's it!
