Jump Menu
Add-ons can easily add custom items for the Jump Menu.
Sample File: https://gist.github.com/obfuscode/77d0135970c9ce8bc84139c127507bb1
Create a
jump.[addon_name].php
file in your add-on folderYour jump file MUST have the following:
use ExpressionEngine\Service\JumpMenu\AbstractJumpMenu; class [AddonName]_jump extends AbstractJumpMenu { protected static $items = [];
Add commands for your custom items.
Item commands are comprised of the following:
[commandTitle]
(string) Unique command title used as key in global jumps array. Will be prefixed with[addonName]:
so a command title in Assets ofeditS3Source
will beAssets:editS3Source
icon
(string) FontAwesome format:fa-file
command
)(string)_ lowercase fuzzy-matched search text:edit external source
command_title
(string) Human-readable command title, shows up in results
Style Note: We use bold, italics, and brackets to denote keywords and actions to the user and urge you to use keep your commands in line with this style: “Edit <b>Your Object</b> titled <i>[secondary keywords]</i>” “Edit Author titled [name]”
dynamic
(bool) default: false, whether your command has secondary resultsrequires_keyword
(bool) default: false, Used in conjunction withdynamic
. Whether your command requires additional keywords to return results or not. An example of afalse
would be returning a list of channels. An example oftrue
would be returning entries where you don’t want to prematurely return them before the user enters something to filter by.target
(string)- If
dynamic
== true: method name in your add-on’s jump file that will be called. Will be passed an array of search keywords. - If
dynamic
== false: method name to redirect the user to in your add-on (ex: settings/license)
This is currently hard-coded to
addons/settings/[addon_name]/X
but will most likely be changed to allow any CP URL path.- If