From 7c38bf4d543642f3ad0653d4904545d7b79d2bbd Mon Sep 17 00:00:00 2001 From: Micha Hobert Date: Wed, 14 Feb 2024 14:36:39 +0100 Subject: [PATCH] Add info where to add values to config (#1292) --- .../add-plugin-configuration.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/guides/plugins/plugins/plugin-fundamentals/add-plugin-configuration.md b/guides/plugins/plugins/plugin-fundamentals/add-plugin-configuration.md index afc3708d3..9c157e93f 100644 --- a/guides/plugins/plugins/plugin-fundamentals/add-plugin-configuration.md +++ b/guides/plugins/plugins/plugin-fundamentals/add-plugin-configuration.md @@ -57,7 +57,7 @@ Please make sure to specify the `xsi:noNamespaceSchemaLocation` as shown above a ### Card Titles -A `` `` is translatable, this is managed via the `lang` attribute. By default the `lang` attribute is set to `en-GB`, to change the locale of a `<title>` just add the attribute as follows: +A `<card>` `<title>` is translatable, this is managed via the `lang` attribute. By default, the `lang` attribute is set to `en-GB`, to change the locale of a `<title>` just add the attribute as follows: ```html ... @@ -95,7 +95,7 @@ Your `<input-field>` can be of different types, this is managed via the `type` a ### Input field settings -These settings are used to configure your `<input-field>`. **Every `<input-field>` has to start with the `<name>` element.** After the `<name>` element you can configure any of the other settings mentioned above. Beside these settings, they have the followings in common: [label](add-plugin-configuration#label-placeholder-and-help-text), [helpText](add-plugin-configuration#label-placeholder-and-help-text), [defaultValue](add-plugin-configuration#defaultvalue) and [disabled](add-plugin-configuration#disabled). +These settings are used to configure your `<input-field>`. **Every `<input-field>` has to start with the `<name>` element.** After the `<name>` element you can configure any of the other settings mentioned above. Besides these settings, they have the followings in common: [label](add-plugin-configuration#label-placeholder-and-help-text), [helpText](add-plugin-configuration#label-placeholder-and-help-text), [defaultValue](add-plugin-configuration#defaultvalue) and [disabled](add-plugin-configuration#disabled). #### Label, placeholder and help text @@ -105,7 +105,7 @@ The settings `<label>`, `<placeholder>` and `<helpText>` are used to label and e Add the `defaultValue` setting to your `<input-field>` to define a default value for it. This value will be imported into the database on installing and updating the plugin. We use [Symfony\Component\Config\Util\XmlUtils](https://github.com/symfony/config/blob/master/Util/XmlUtils.php#L215) for casting the values into the correct PHP types. -Below you'll find an example how to use this setting. +Below, you'll find an example of how to use this setting. ```html <input-field type="text"> @@ -119,7 +119,7 @@ Below you'll find an example how to use this setting. You can add the `<disabled>` setting to any of your `<input-field>` elements to disable it. -Below you'll find an example how to use this setting. +Below, you'll find an example of how to use this setting. ```html <input-field> @@ -134,7 +134,7 @@ _Please note, `<disabled>` only takes boolean values._ You can add the `<copyable>` setting to your `<input-field>` which are of type `text` or extensions of it. This will add a button at the right, which on click copies the content of your `<input-field>` into the clipboard. -Below you'll find an example how to use this setting. +Below, you'll find an example of how to use this setting. ```html <input-field> @@ -291,6 +291,10 @@ Now all that's left to do is to present you a working example `config.xml` and s </config> ``` +## Add values to your configuration + +After adding your input fields to the `config.xml`, you can add values to your configuration. To do so, navigate from the sidebar to the `Settings` > `System` > `Plugins` and click on your plugin's `...` button. Now you can see the `Config` tab and fill in the values for your input fields. + ## Next steps -Now you've added your own plugin configuration. But how do you actually read which configurations the shop owner used? This will be covered in our guide about [Using the plugin configuration](use-plugin-configuration). +Now you've added your own plugin configuration. But how do you actually read which configurations the shop owner used? This will be covered in our guide about [Using the plugin configuration](use-plugin-configuration). \ No newline at end of file