|
| 1 | +Quicktask Link and Icon |
| 2 | +======================= |
| 3 | + |
| 4 | +In general, a component has has one or more links to its views. They are defined in the manifest file and added to the menu during installation. |
| 5 | + |
| 6 | +```xml title="A link to your component " |
| 7 | +<administration> |
| 8 | + <menu> |
| 9 | + COM_EXAMPLE |
| 10 | + </menu> |
| 11 | + |
| 12 | + [..] |
| 13 | +</administration> |
| 14 | +``` |
| 15 | +Sometimes it is useful to add a so called <strong>quicktask link</strong> which enables an action calling from the menu without first visiting the Overview. |
| 16 | +You can see this for Joomla core components, for example articles in com_content, here the quicktask is the plus icon and lets you add a new article in a single click. |
| 17 | +Your menu link is added in the manfest file during installation. |
| 18 | + |
| 19 | +## Qicktask link |
| 20 | + |
| 21 | +A quicktask link and icon are added as params to a menu item. |
| 22 | + |
| 23 | +```xml title="Qicktask Link and icon" |
| 24 | + <menu link="option=com_example&view=examples"> |
| 25 | + COM_EXAMPLE |
| 26 | + <params> |
| 27 | + <menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title> |
| 28 | + <menu-quicktask>index.php?option=com_example&view=example&layout=edit</menu-quicktask> |
| 29 | + </params> |
| 30 | + </menu> |
| 31 | + |
| 32 | +``` |
| 33 | + |
| 34 | +## Example |
| 35 | + |
| 36 | +This example shows a complete menu entry with dashboard, submenu and a quicktask. |
| 37 | + |
| 38 | +```xml |
| 39 | + <menu> |
| 40 | + COM_EXAMPLE |
| 41 | + <params> |
| 42 | + <dashboard>example</dashboard> |
| 43 | + </params> |
| 44 | + </menu> |
| 45 | + <submenu> |
| 46 | + <menu link="option=com_example"> |
| 47 | + COM_EXAMPLE_MENU |
| 48 | + <params> |
| 49 | + <menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title> |
| 50 | + <menu-quicktask>index.php?option=com_example&view=example&layout=edit</menu-quicktask> |
| 51 | + </params> |
| 52 | + </menu> |
| 53 | + <menu link="option=com_categories&extension=com_example"> |
| 54 | + COM_EXAMPLE_MENU_CATEGORIES |
| 55 | + <params> |
| 56 | + <menu-quicktask-title>COM_EXAMPLE_MENU_CATEGORIES</menu-quicktask-title> |
| 57 | + <menu-quicktask>index.php?option=com_categories&view=category&layout=edit&extension=com_example</menu-quicktask> |
| 58 | + </params> |
| 59 | + </menu> |
| 60 | + <menu link="option=com_fields&view=fields&context=com_example,example">COM_EXAMPLE_MENU_FIELDS</menu> |
| 61 | + <menu link="option=com_fields&view=groups&context=com_example,example">COM_EXAMPLE_MENU_FIELDS_GROUP</menu> |
| 62 | + </submenu> |
| 63 | + |
| 64 | +``` |
0 commit comments