1 | <?php |
---|
2 | /** |
---|
3 | * @brief simpleMenu, a plugin for Dotclear 2 |
---|
4 | * |
---|
5 | * @package Dotclear |
---|
6 | * @subpackage Plugins |
---|
7 | * |
---|
8 | * @copyright Olivier Meunier & Association Dotclear |
---|
9 | * @copyright GPL-2.0-only |
---|
10 | */ |
---|
11 | |
---|
12 | if (!defined('DC_RC_PATH')) {return;} |
---|
13 | |
---|
14 | $core->addBehavior('initWidgets', ['simpleMenuWidgets', 'initWidgets']); |
---|
15 | |
---|
16 | class simpleMenuWidgets |
---|
17 | { |
---|
18 | public static function initWidgets($w) |
---|
19 | { |
---|
20 | $w->create('simplemenu', __('Simple menu'), ['tplSimpleMenu', 'simpleMenuWidget'], null, 'List of simple menu items'); |
---|
21 | $w->simplemenu->setting('title', __('Title (optional)') . ' :', __('Menu')); |
---|
22 | $w->simplemenu->setting('description', __('Item description'), 0, 'combo', |
---|
23 | [ |
---|
24 | __('Displayed in link') => 0, // span |
---|
25 | __('Used as link title') => 1, // title |
---|
26 | __('Displayed in link and used as title') => 2, // both |
---|
27 | __('Not displayed nor used') => 3 // none |
---|
28 | ] |
---|
29 | ); |
---|
30 | $w->simplemenu->setting('homeonly', __('Display on:'), 0, 'combo', |
---|
31 | [ |
---|
32 | __('All pages') => 0, |
---|
33 | __('Home page only') => 1, |
---|
34 | __('Except on home page') => 2 |
---|
35 | ] |
---|
36 | ); |
---|
37 | $w->simplemenu->setting('content_only', __('Content only'), 0, 'check'); |
---|
38 | $w->simplemenu->setting('class', __('CSS class:'), ''); |
---|
39 | $w->simplemenu->setting('offline', __('Offline'), 0, 'check'); |
---|
40 | } |
---|
41 | } |
---|