sortedMenus/README.en.md

69 lignes
2.5 KiB
Markdown
Brut Vue normale Historique

2021-12-11 13:15:21 +01:00
[![deutsche Version](https://logos.oxidmodule.com/de2_xs.svg)](README.md)
[![english version](https://logos.oxidmodule.com/en2_xs.svg)](README.en.md)
2021-12-13 00:07:45 +01:00
# D³ Sortable Menus for OXID eShop
2021-12-11 13:15:21 +01:00
2021-12-12 00:01:57 +01:00
The module offers the possibility to sort the admin menus into a desired order.
2021-12-11 13:15:21 +01:00
2021-12-12 00:01:57 +01:00
The side menu on the left and the tabs in each individual area can be sorted.
The action links of the areas are also configured via the menu.xml, but are loaded in the template in a fixed order.
2021-12-11 13:15:21 +01:00
2021-12-12 00:01:57 +01:00
The entries can only be moved in the currently selected level.
2021-12-11 13:15:21 +01:00
## Installation
In the console in the shop root (above source and vendor), execute the following command:
```bash
2021-12-12 00:01:57 +01:00
php composer require d3/sortedmenus
2021-12-11 13:15:21 +01:00
```
Activate the module in the admin area of the shop in "Extensions -> Modules".
2021-12-12 00:01:57 +01:00
## Configuration
For the sake of simplicity, the configuration is done directly in the configuration file of the shop (`config.inc.php`).
Insert the following configuration as an example:
```php
$this->d3MenuSorting = [
// mainmenu
'move articles and order panels in front' => [
'xpath' => "//OX/*[@id='NAVIGATION_ESHOPADMIN']/MAINMENU",
'order' => ['mxmanageprod', 'mxorders']
],
// submenu
'move vouchers in shop settings to front' => [
'xpath' => "//OX/*[@id='NAVIGATION_ESHOPADMIN']/*[@id='mxshopsett']/SUBMENU",
'order' => ['mxvouchers']
],
// tabs
'show category picture tab as first' => [
'xpath' => "//OX/*[@id='NAVIGATION_ESHOPADMIN']/*[@id='mxmanageprod']/*[@id='mxcategories']/TAB",
'order' => ['tbclcategory_pictures']
]
];
```
2021-12-11 13:15:21 +01:00
2021-12-12 00:01:57 +01:00
Each entry defines a menu level with the xPath specification in which sorting can take place. The xPath can be determined in the respective menu.xml. Describe the xPath as precisely as possible (ideally using the unique ELement IDs), otherwise the elements to be moved could end up in the wrong area.
2021-12-11 13:15:21 +01:00
2021-12-12 00:01:57 +01:00
In the order entry, the IDs of the contained entries are in the correct order. Entries that are not contained are automatically appended to the end of the sorted list in the previous sort order.
2021-12-11 13:15:21 +01:00
2021-12-12 00:01:57 +01:00
After changing the sorting entries, the tmp folder must be emptied.
2021-12-11 13:15:21 +01:00
## Changelog
See [CHANGELOG](CHANGELOG.md) for further informations.
2021-12-12 00:01:57 +01:00
## Licence of this software (d3/sortedmenus)
(status: 2021-12-11)
2021-12-11 13:15:21 +01:00
```
Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
This software is distributed under the GNU GENERAL PUBLIC LICENSE version 3.
```
For full copyright and licensing information, please see the [LICENSE](LICENSE.md) file distributed with this source code.