├── CHANGELOG.md ├── LICENSE.txt ├── README.md ├── RichVariablesPlugin.php ├── composer.json ├── controllers └── RichVariablesController.php ├── releases.json ├── resources ├── css │ ├── RichVariables_Style.css │ └── richvariables.css ├── icon.svg ├── js │ ├── RichVariables_Script.js │ ├── foreachpolyfill.js │ └── richvariables.js └── screenshots │ ├── richvariables00.png │ ├── richvariables01.png │ ├── richvariables02.png │ ├── richvariables03.png │ ├── richvariables04.png │ └── richvariables05.png └── templates └── RichVariables_Settings.twig /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Rich Variables Changelog 2 | 3 | ## 1.0.5 - 2017.02.24 4 | ### Fixed 5 | * Fixed a styling issue with Craft CMS 2.6.2963 due to its uses of Redactor 2.2 6 | 7 | ### Changed 8 | * Handle the situation of there being a globals set, but it not being set in the RichVariables preferences 9 | * Removed the unused `icon-mask.svg` file 10 | 11 | ## 1.0.4 - 2017.02.09 12 | ### Changed 13 | * Removed `allowAnonymous` from the controller, since we only want to work for logged in users 14 | 15 | ## 1.0.3 - 2017.02.07 16 | ### Fixed 17 | * Fixed an issue where the user might be redirected errantly to JSON settings on login 18 | 19 | ### Changed 20 | * Removed the spaces inside of the inserted `` tags 21 | 22 | ## 1.0.2 - 2017.02.06 23 | ### Added 24 | * Added a setting to control whether the Rich Variables menu should be text or an icon 25 | 26 | ### Changed 27 | * Harmonized the code with the Craft 3 version 28 | 29 | ## 1.0.1 - 2017.02.04 30 | ### Added 31 | * Added support for Preparse fields 32 | * Added support for Date fields 33 | * Added support for Dropdown fields 34 | 35 | ### Changed 36 | * Updated screenshots in README.md 37 | 38 | ## 1.0.0 - 2017.02.04 39 | ### Added 40 | * Initial release 41 | 42 | Brought to you by [nystudio107](https://nystudio107.com) 43 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2017 nystudio107 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/) 2 | 3 | # DEPRECATED 4 | 5 | This Craft CMS 2.x plugin is no longer supported, but it is fully functional, and you may continue to use it as you see fit. The license also allows you to fork it and make changes as needed for legacy support reasons. 6 | 7 | The Craft CMS 3.x version of this plugin can be found here: [craft-richvariables](https://github.com/nystudio107/craft-richvariables) and can also be installed via the Craft Plugin Store in the Craft CP. 8 | 9 | # Rich Variables plugin for Craft CMS 10 | 11 | Allows you to easily use Craft Globals as variables in Rich Text fields 12 | 13 | Related: [Rich Variables for Craft 3.x](https://github.com/nystudio107/craft3-richvariables) 14 | 15 | ![Screenshot](resources/screenshots/richvariables00.png) 16 | 17 | ## Installation 18 | 19 | To install Rich Variables, follow these steps: 20 | 21 | 1. Download & unzip the file and place the `richvariables` directory into your `craft/plugins` directory 22 | 2. -OR- do a `git clone https://github.com/nystudio107/richvariables.git` directly into your `craft/plugins` folder. You can then update it with `git pull` 23 | 3. -OR- install with Composer via `composer require nystudio107/richvariables` 24 | 4. Install plugin in the Craft Control Panel under Settings > Plugins 25 | 5. The plugin folder should be named `richvariables` for Craft to see it. GitHub recently started appending `-master` (the branch name) to the name of the folder for zip file downloads. 26 | 27 | Rich Variables works on Craft 2.5.x and Craft 2.6.x. 28 | 29 | ## Rich Variables Overview 30 | 31 | Rich Variables allows you to easily use Craft Globals as variables in Rich Text fields. 32 | 33 | For instance, you might have loan rates that appear in the body of multiple Rich Text fields, and maybe even in multiple places in each field. When it comes time to update those loan rates, you can just change them in your Globals set, and they will be automatically updated wherever they are used in your Rich Text fields. 34 | 35 | ## Configuring Rich Variables 36 | 37 | To configure Rich Variables, first you'll need to create a Globals set (if you don't have one already) by clicking on **Settings**→**Globals**: 38 | 39 | ![Screenshot](resources/screenshots/richvariables01.png) 40 | 41 | You can put any kinds of fields that you want into your Globals set, but Rich Variables only recognizes the following FieldTypes currently: `PlainText`, `Number`, `Date`, `Dropdown`, and `Preparse`. 42 | 43 | Next, you need to tell Rich Variables which Globals set (you can have an arbitrary number of them) that it should use. To do this, click on **Settings**→**Rich Variables** and choose your Globals set, then click on **Save**: 44 | 45 | ![Screenshot](resources/screenshots/richvariables02.png) 46 | 47 | Finally, we'll need to let Redactor (the Craft 2.x Rich Text editor) know that we want to use the Rich Variables plugin. You can do this by editing the Redactor settings in `craft/config/redactor/`. Make sure you edit the settings that your Rich Text fields use to add `richvariables` to the `plugins` array. 48 | 49 | For example, here's what my `Standard.json` Redactor settings looks like: 50 | 51 | { 52 | "buttons": ["format","kbd","bold","italic","lists","link","file","horizontalrule"], 53 | "plugins": ["source","fullscreen","richvariables"] 54 | } 55 | 56 | Note that `richvariables` was added to the `plugins` array above. 57 | 58 | If Rich Variables isn't appearing in your Rich Text fields, it's usually because the Rich Text fields aren't using the Redactor settings where you added `richvariables` to the `plugins` array. 59 | 60 | ## Using Rich Variables 61 | 62 | The setup was the hard part. Using Rich Variables is easy, just go to your Rich Text field, and click on the newly added Rich Variables icon to see a list of your Globals set variables: 63 | 64 | ![Screenshot](resources/screenshots/richvariables03.png) 65 | 66 | Choose one to insert it into your Rich Text field. You'll see some code-looking stuff inserted, such as `{globalset:737:loanName}` in the example above. 67 | 68 | This is actually a [Reference Tag](https://craftcms.com/docs/reference-tags) to the Globals set Element and Field that you chose. But that needn't concern you, because once you save the Entry, it will appear like this: 69 | 70 | ![Screenshot](resources/screenshots/richvariables04.png) 71 | 72 | ...with a tokenized display of the actual value that is in your Globals set Fields. If you change the values in your Globals set Fields, they will automatically be updated everywhere they are used in your Rich Text fields. 73 | 74 | On the frontend, the display of the Rich Text field will also automatically include the Globals set values, and might look something like this: 75 | 76 | ![Screenshot](resources/screenshots/richvariables05.png) 77 | 78 | The fun thing about the way Rich Variables works is that since it leverages the built-in Craft functionality of [Reference Tags](https://craftcms.com/docs/reference-tags), even if you uninstall the Rich Variables plugin, everything will continue to work. 79 | 80 | Nice. 81 | 82 | ## Miscellanea 83 | 84 | To display itself in a tokenized way, Rich Variables wraps the inserted variables in `` tags. The default styling for these seldom-used tags is `text-decoration: underline;` in many browsers. So for frontend display, you might need to add some CSS to override this if you don't want them underlined. 85 | 86 | Redactor can be a little weird with inline styles; this isn't anything specific to Rich Variables. What I typically do is when I want to insert an inline style, I type two spaces, then the left-arrow key, and then I insert my inline style in Redactor. This ensures that there is a space on either side of the inline style, and prevents some formatting headaches. 87 | 88 | ## Rich Variables Roadmap 89 | 90 | Some things to do, and ideas for potential features: 91 | 92 | * Rich Variables could potentially have different Global sets for different Channels 93 | * We could allow for things other than Global sets to be available for insertion, such as Entry values, Categories, etc. 94 | 95 | Brought to you by [nystudio107](https://nystudio107.com) 96 | -------------------------------------------------------------------------------- /RichVariablesPlugin.php: -------------------------------------------------------------------------------- 1 | isConsole()) { 52 | if (craft()->request->isCpRequest() && craft()->userSession->isLoggedIn()) { 53 | craft()->templates->includeCssResource('richvariables/css/richvariables.css'); 54 | craft()->templates->includeJsResource('richvariables/js/foreachpolyfill.js'); 55 | craft()->templates->includeJsResource('richvariables/js/richvariables.js'); 56 | } 57 | } 58 | } 59 | 60 | protected function defineSettings() 61 | { 62 | return array( 63 | 'globalSetHandle' => array(AttributeType::String, 'label' => 'Global Set', 'default' => ''), 64 | 'useIconForMenu' => array(AttributeType::Bool, 'label' => 'Use Icon for Menu', 'default' => true), 65 | ); 66 | } 67 | 68 | public function getSettingsHtml() 69 | { 70 | // Get all of the globals sets 71 | $globalsHandles = array(); 72 | $allGlobalsSets = craft()->globals->getAllSets(); 73 | foreach ($allGlobalsSets as $globalsSet) { 74 | $globalsHandles[$globalsSet->handle] = $globalsSet->name; 75 | } 76 | // Render our settings template 77 | return craft()->templates->render('richvariables/RichVariables_Settings', array( 78 | 'settings' => $this->getSettings(), 79 | 'globalsSets' => $globalsHandles, 80 | )); 81 | } 82 | 83 | public function prepSettings($settings) 84 | { 85 | // Modify $settings here... 86 | 87 | return $settings; 88 | } 89 | } -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nystudio107/richvariables", 3 | "description": "Allows you to easily use Craft Globals as variables in Rich Text fields", 4 | "type": "craft-plugin", 5 | "authors": [ 6 | { 7 | "name": "nystudio107", 8 | "homepage": "https://nystudio107.com" 9 | } 10 | ], 11 | "require": { 12 | "composer/installers": "~1.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /controllers/RichVariablesController.php: -------------------------------------------------------------------------------- 1 | plugins->getPlugin('richvariables')->getSettings(); 27 | $globalsSet = craft()->globals->getSetByHandle($settings['globalSetHandle']); 28 | // Grab the first global set if they haven't specified one yet 29 | if (!$globalsSet) { 30 | $allGlobalsSetIds = craft()->globals->getAllSetIds(); 31 | if (!empty($allGlobalsSetIds)) { 32 | $globalsSet = craft()->globals->getSetById($allGlobalsSetIds[0]); 33 | } 34 | } 35 | if ($globalsSet) { 36 | // Get the fieldlayout fields used for this global set 37 | $fieldLayoutFields = $globalsSet->getFieldLayout()->getFields(); 38 | foreach ($fieldLayoutFields as $fieldLayoutField) { 39 | // Get the actual field, and check that it's type is something we support 40 | $field = craft()->fields->getFieldById($fieldLayoutField->fieldId); 41 | switch ($field->type) { 42 | case "PlainText": 43 | case "Number": 44 | case "PreparseField_Preparse": 45 | case "Date": 46 | case "Dropdown": 47 | // Add the field title and Reference Tag as per https://craftcms.com/docs/reference-tags 48 | $value = $globalsSet->getContent()[$field->handle]; 49 | $thisVar = array( 50 | 'title' => $field->name, 51 | 'text' => "{globalset:" . $globalsSet->attributes['id'] . ":" . $field->handle . "}", 52 | ); 53 | array_push($variablesList, $thisVar); 54 | break; 55 | 56 | case "Table": 57 | case "SuperTable": 58 | // This may not be possible with native reference tags 59 | break; 60 | 61 | default: 62 | // NOP 63 | break; 64 | } 65 | } 66 | } 67 | 68 | // Return everything to our JavaScript encoded as JSON 69 | $result['variablesList'] = $variablesList; 70 | $result['useIconForMenu'] = $settings['useIconForMenu']; 71 | $this->returnJson($result); 72 | } 73 | } -------------------------------------------------------------------------------- /releases.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "version": "1.0.5", 4 | "downloadUrl": "https://github.com/nystudio107/richvariables/archive/master.zip", 5 | "date": "2017-02-24T23:39:19.322Z", 6 | "notes": [ 7 | "[Fixed] Fixed a styling issue with Craft CMS 2.6.2963 due to its uses of Redactor 2.2", 8 | "[Improved] Handle the situation of there being a globals set, but it not being set in the RichVariables preferences", 9 | "[Improved] Removed the unused `icon-mask.svg` file" 10 | ] 11 | }, 12 | { 13 | "version": "1.0.4", 14 | "downloadUrl": "https://github.com/nystudio107/richvariables/archive/master.zip", 15 | "date": "2017-02-09T23:39:19.322Z", 16 | "notes": [ 17 | "[Improved] Removed `allowAnonymous` from the controller, since we only want to work for logged in users" 18 | ] 19 | }, 20 | { 21 | "version": "1.0.3", 22 | "downloadUrl": "https://github.com/nystudio107/richvariables/archive/master.zip", 23 | "date": "2017-02-07T23:39:19.322Z", 24 | "notes": [ 25 | "[Fixed] Fixed an issue where the user might be redirected errantly to JSON settings on login", 26 | "[Improved] Removed the spaces inside of the inserted `` tags" 27 | ] 28 | }, 29 | { 30 | "version": "1.0.2", 31 | "downloadUrl": "https://github.com/nystudio107/richvariables/archive/master.zip", 32 | "date": "2017-02-06T23:39:19.322Z", 33 | "notes": [ 34 | "[Added] Added a setting to control whether the Rich Variables menu should be text or an icon", 35 | "[Improved] Harmonized the code with the Craft 3 version" 36 | ] 37 | }, 38 | { 39 | "version": "1.0.1", 40 | "downloadUrl": "https://github.com/nystudio107/richvariables/archive/master.zip", 41 | "date": "2017-02-04T23:39:19.322Z", 42 | "notes": [ 43 | "[Added] Added support for Preparse fields", 44 | "[Added] Added support for Date fields", 45 | "[Added] Added support for Dropdown fields", 46 | "[Improved] Updated screenshots in README.md" 47 | ] 48 | }, 49 | { 50 | "version": "1.0.0", 51 | "downloadUrl": "https://github.com/nystudio107/richvariables/archive/master.zip", 52 | "date": "2017-02-04T06:03:23.268Z", 53 | "notes": [ 54 | "[Added] Initial release" 55 | ] 56 | } 57 | ] -------------------------------------------------------------------------------- /resources/css/RichVariables_Style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Rich Variables plugin for Craft CMS 3 | * 4 | * Rich Variables CSS 5 | * 6 | * @author nystudio107 7 | * @copyright Copyright (c) 2017 nystudio107 8 | * @link https://nystudio107.com 9 | * @package RichVariables 10 | * @since 1.0.0 11 | */ 12 | -------------------------------------------------------------------------------- /resources/css/richvariables.css: -------------------------------------------------------------------------------- 1 | /* -- Use the tag for our tokenized variables */ 2 | 3 | .redactor-layer ins, 4 | .redactor-editor ins { 5 | text-decoration: none!important; 6 | background-color: #DDDDDD; 7 | border-radius: 10px; 8 | border: 1px solid #C1C1C1; 9 | color: #29323D; 10 | padding: 1px 7px; 11 | margin: 0px 5px; 12 | text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5); 13 | font-size: 12px; 14 | line-height: 14px; 15 | } 16 | -------------------------------------------------------------------------------- /resources/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /resources/js/RichVariables_Script.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Rich Variables plugin for Craft CMS 3 | * 4 | * Rich Variables JS 5 | * 6 | * @author nystudio107 7 | * @copyright Copyright (c) 2017 nystudio107 8 | * @link https://nystudio107.com 9 | * @package RichVariables 10 | * @since 1.0.0 11 | */ 12 | -------------------------------------------------------------------------------- /resources/js/foreachpolyfill.js: -------------------------------------------------------------------------------- 1 | // Production steps of ECMA-262, Edition 5, 15.4.4.18 2 | // Reference: http://es5.github.io/#x15.4.4.18 3 | if (!Array.prototype.forEach) { 4 | 5 | Array.prototype.forEach = function(callback, thisArg) { 6 | 7 | var T, k; 8 | 9 | if (this === null) { 10 | throw new TypeError('this is null or not defined'); 11 | } 12 | 13 | // 1. Let O be the result of calling toObject() passing the 14 | // |this| value as the argument. 15 | var O = Object(this); 16 | 17 | // 2. Let lenValue be the result of calling the Get() internal 18 | // method of O with the argument "length". 19 | // 3. Let len be toUint32(lenValue). 20 | var len = O.length >>> 0; 21 | 22 | // 4. If isCallable(callback) is false, throw a TypeError exception. 23 | // See: http://es5.github.com/#x9.11 24 | if (typeof callback !== 'function') { 25 | throw new TypeError(callback + ' is not a function'); 26 | } 27 | 28 | // 5. If thisArg was supplied, let T be thisArg; else let 29 | // T be undefined. 30 | if (arguments.length > 1) { 31 | T = thisArg; 32 | } 33 | 34 | // 6. Let k be 0 35 | k = 0; 36 | 37 | // 7. Repeat, while k < len 38 | while (k < len) { 39 | 40 | var kValue; 41 | 42 | // a. Let Pk be ToString(k). 43 | // This is implicit for LHS operands of the in operator 44 | // b. Let kPresent be the result of calling the HasProperty 45 | // internal method of O with argument Pk. 46 | // This step can be combined with c 47 | // c. If kPresent is true, then 48 | if (k in O) { 49 | 50 | // i. Let kValue be the result of calling the Get internal 51 | // method of O with argument Pk. 52 | kValue = O[k]; 53 | 54 | // ii. Call the Call internal method of callback with T as 55 | // the this value and argument list containing kValue, k, and O. 56 | callback.call(T, kValue, k, O); 57 | } 58 | // d. Increase k by 1. 59 | k++; 60 | } 61 | // 8. return undefined 62 | }; 63 | } 64 | -------------------------------------------------------------------------------- /resources/js/richvariables.js: -------------------------------------------------------------------------------- 1 | if (!RedactorPlugins) var RedactorPlugins = {}; 2 | 3 | // Grab the globals set Reference Tags from our controller 4 | var request = new XMLHttpRequest(); 5 | request.open('GET', Craft.getActionUrl('/richVariables'), false); 6 | request.onload = function() { 7 | if (request.status >= 200 && request.status < 400) { 8 | } else { 9 | } 10 | }; 11 | request.send(); 12 | 13 | // Add our Redactor plugin 14 | RedactorPlugins.richvariables = function() { 15 | return { 16 | init: function() { 17 | var dropdown = {}; 18 | var responseVars = JSON.parse(request.responseText); 19 | var _this = this; 20 | 21 | // Iterate through each menu item, adding them to our dropdown 22 | responseVars.variablesList.forEach(function(menuItem, index) { 23 | var key = 'point' + (index + 1); 24 | dropdown[key] = { 25 | title: menuItem.title, 26 | func: function(buttonName) { 27 | this.insert.raw('' + menuItem.text + ''); 28 | }, 29 | }; 30 | }); 31 | // Handle empty menu items 32 | if (responseVars.variablesList.length === 0) { 33 | dropdown.point1 = { 34 | title: "No Globals Found", 35 | func: function(buttonName) { 36 | // NOP 37 | }, 38 | }; 39 | } 40 | // Add the button and dropdown 41 | var button = this.button.add('variables', 'Variables'); 42 | this.button.addDropdown(button, dropdown); 43 | if (responseVars.useIconForMenu) 44 | this.button.setIcon(button, ''); 45 | }, 46 | }; 47 | }; -------------------------------------------------------------------------------- /resources/screenshots/richvariables00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nystudio107/richvariables/38b31ec379146a7a5b70b5c3e426b73112df85ed/resources/screenshots/richvariables00.png -------------------------------------------------------------------------------- /resources/screenshots/richvariables01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nystudio107/richvariables/38b31ec379146a7a5b70b5c3e426b73112df85ed/resources/screenshots/richvariables01.png -------------------------------------------------------------------------------- /resources/screenshots/richvariables02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nystudio107/richvariables/38b31ec379146a7a5b70b5c3e426b73112df85ed/resources/screenshots/richvariables02.png -------------------------------------------------------------------------------- /resources/screenshots/richvariables03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nystudio107/richvariables/38b31ec379146a7a5b70b5c3e426b73112df85ed/resources/screenshots/richvariables03.png -------------------------------------------------------------------------------- /resources/screenshots/richvariables04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nystudio107/richvariables/38b31ec379146a7a5b70b5c3e426b73112df85ed/resources/screenshots/richvariables04.png -------------------------------------------------------------------------------- /resources/screenshots/richvariables05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nystudio107/richvariables/38b31ec379146a7a5b70b5c3e426b73112df85ed/resources/screenshots/richvariables05.png -------------------------------------------------------------------------------- /templates/RichVariables_Settings.twig: -------------------------------------------------------------------------------- 1 | {# 2 | /** 3 | * Rich Variables plugin for Craft CMS 4 | * 5 | * Rich Variables Settings.twig 6 | * 7 | * @author nystudio107 8 | * @copyright Copyright (c) 2017 nystudio107 9 | * @link https://nystudio107.com 10 | * @package RichVariables 11 | * @since 1.0.0 12 | */ 13 | #} 14 | 15 | {% import "_includes/forms" as forms %} 16 | 17 | {% includeCssResource "richvariables/css/RichVariables_Style.css" %} 18 | {% includeJsResource "richvariables/js/RichVariables_Script.js" %} 19 | 20 | {{ forms.selectField({ 21 | label: 'Globals Set', 22 | instructions: 'Choose the Globals Set that should be available for insertion into Rich Text fields' | t, 23 | id: 'globalSetHandle', 24 | name: 'globalSetHandle', 25 | options: globalsSets, 26 | value: settings['globalSetHandle'] 27 | }) }} 28 | 29 | {{ forms.lightswitchField({ 30 | label: "Use Icon for Menu"|t, 31 | instructions: "Controls whether the Rich Variables menu should display itself as an icon or text" |t, 32 | id: 'useIconForMenu', 33 | name: 'useIconForMenu', 34 | on: settings['useIconForMenu'], 35 | }) }} 36 | --------------------------------------------------------------------------------