Skip to content

Commit

Permalink
Sync with 5.2 and fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
HLeithner committed Oct 18, 2024
1 parent d46e266 commit e866f4c
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 87 deletions.
91 changes: 54 additions & 37 deletions docs/building-extensions/components/quicktasklink.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Quicktask Link and Icon
=======================

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.
In general, a component has one or more links to its views. They are defined in the manifest file and added to the menu during installation.

```xml title="A link to your component "
<administration>
Expand All @@ -16,49 +16,66 @@ Sometimes it is useful to add a so called <strong>quicktask link</strong> which
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.
Your menu link is added in the manfest file during installation.

## Qicktask link
## Quicktask Link and Title

A quicktask link and icon are added as params to a menu item.
A quicktask link and title are added as params to a menu item.

```xml title="Qicktask Link and icon"
<menu link="option=com_example&amp;view=examples">
COM_EXAMPLE
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
</params>
</menu>
```xml title="Quicktask Link and title"
<menu link="option=com_example&amp;view=examples">
COM_EXAMPLE
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
</params>
</menu>
```
The title translation string needs to appear in the language `.sys.ini` file for the extension

## Quicktask Icon

The default icon is the '+' sign indicating create a new item as this is the most common usage in the built-in compponents.

You can specify a different icon, either as a simple name for the built in common aliased icons (the `icon-` prefix will be automatically added), or as the font-awesome specification.

```xml title="Quicktask Link and icon"
<menu link="option=com_example&amp;view=examples">
COM_EXAMPLE
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
<menu-quicktask-icon>eye</menu-quicktask-icon>
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=view</menu-quicktask>
</params>
</menu>
```

## Example

This example shows a complete menu entry with dashboard, submenu and a quicktask.
This example shows a complete menu entry with dashboard, submenu and a quicktask. The second item with a quicktask includes a fontawesome icon that has not been aliased.

```xml
<menu>
COM_EXAMPLE
<params>
<dashboard>example</dashboard>
</params>
</menu>
<submenu>
<menu link="option=com_example">
COM_EXAMPLE_MENU
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
</params>
</menu>
<menu link="option=com_categories&amp;extension=com_example">
COM_EXAMPLE_MENU_CATEGORIES
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_CATEGORIES</menu-quicktask-title>
<menu-quicktask>index.php?option=com_categories&amp;view=category&amp;layout=edit&amp;extension=com_example</menu-quicktask>
</params>
</menu>
<menu link="option=com_fields&amp;view=fields&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS</menu>
<menu link="option=com_fields&amp;view=groups&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS_GROUP</menu>
</submenu>

<menu>
COM_EXAMPLE
<params>
<dashboard>example</dashboard>
</params>
</menu>
<submenu>
<menu link="option=com_example">
COM_EXAMPLE_MENU
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
</params>
</menu>
<menu link="option=com_categories&amp;extension=com_example">
COM_EXAMPLE_MENU_CATEGORIES
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_CATEGORIES</menu-quicktask-title>
<menu-quicktask-icon>fas fa-person-hiking</menu-quicktask-icon>
<menu-quicktask>index.php?option=com_categories&amp;view=category&amp;layout=edit&amp;extension=com_example</menu-quicktask>
</params>
</menu>
<menu link="option=com_fields&amp;view=fields&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS</menu>
<menu link="option=com_fields&amp;view=groups&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS_GROUP</menu>
</submenu>
```
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Quicktask Link and Icon
=======================

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.
In general, a component has one or more links to its views. They are defined in the manifest file and added to the menu during installation.

```xml title="A link to your component "
<administration>
Expand All @@ -20,65 +20,62 @@ Your menu link is added in the manfest file during installation.

A quicktask link and title are added as params to a menu item.

```xml title="Qicktask Link and title"
<menu link="option=com_example&amp;view=examples">
COM_EXAMPLE
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
</params>
</menu>

```xml title="Quicktask Link and title"
<menu link="option=com_example&amp;view=examples">
COM_EXAMPLE
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
</params>
</menu>
```
NB the title translation string needs to appear in the language `.sys.ini` file for the extension
The title translation string needs to appear in the language `.sys.ini` file for the extension

## Quicktask Icon

The default icon is the '+' sign indicating create a new item as this is the most common usage in the built-in compponents.
The default icon is the '+' sign indicating create a new item as this is the most common usage in the built-in compponents.

You can specify a different icon, either as a simple name for the built in common aliased icons (the `icon-` prefix will be automatically added), or as the font-awesome specification.

```xml title="Qicktask Link and icon"
<menu link="option=com_example&amp;view=examples">
COM_EXAMPLE
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
<menu-quicktask-icon>eye</menu-quicktask-icon>
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=view</menu-quicktask>
</params>
</menu>
You can specify a different icon, either as a simple name for the built in common aliased icons (the `icon-` prefix will be automatically added), or as the font-awesome specification.

```xml title="Quicktask Link and icon"
<menu link="option=com_example&amp;view=examples">
COM_EXAMPLE
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
<menu-quicktask-icon>eye</menu-quicktask-icon>
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=view</menu-quicktask>
</params>
</menu>
```

## Example
## Example

This example shows a complete menu entry with dashboard, submenu and a quicktask. The second item with a quicktask includes a fontawesome icon that has not been aliased.

```xml
<menu>
COM_EXAMPLE
<params>
<dashboard>example</dashboard>
</params>
</menu>
<submenu>
<menu link="option=com_example">
COM_EXAMPLE_MENU
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
</params>
</menu>
<menu link="option=com_categories&amp;extension=com_example">
COM_EXAMPLE_MENU_CATEGORIES
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_CATEGORIES</menu-quicktask-title>
<menu-quicktask-icon>fas fa-person-hiking</menu-quicktask-icon>
<menu-quicktask>index.php?option=com_categories&amp;view=category&amp;layout=edit&amp;extension=com_example</menu-quicktask>
</params>
</menu>
<menu link="option=com_fields&amp;view=fields&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS</menu>
<menu link="option=com_fields&amp;view=groups&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS_GROUP</menu>
</submenu>

<menu>
COM_EXAMPLE
<params>
<dashboard>example</dashboard>
</params>
</menu>
<submenu>
<menu link="option=com_example">
COM_EXAMPLE_MENU
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
</params>
</menu>
<menu link="option=com_categories&amp;extension=com_example">
COM_EXAMPLE_MENU_CATEGORIES
<params>
<menu-quicktask-title>COM_EXAMPLE_MENU_CATEGORIES</menu-quicktask-title>
<menu-quicktask-icon>fas fa-person-hiking</menu-quicktask-icon>
<menu-quicktask>index.php?option=com_categories&amp;view=category&amp;layout=edit&amp;extension=com_example</menu-quicktask>
</params>
</menu>
<menu link="option=com_fields&amp;view=fields&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS</menu>
<menu link="option=com_fields&amp;view=groups&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS_GROUP</menu>
</submenu>
```

0 comments on commit e866f4c

Please sign in to comment.