You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,7 +176,33 @@ Config for this plugin is stored as a part of the `config/plugins.{js|ts}` or `c
176
176
177
177
It is advised to configure additional fields through the plugin's Settings Page. There you can find the table of custom fields and toggle input for the audience field. When enabled, the audience field can be customized through the content manager. Custom fields can be added, edited, toggled, and removed with the use of the table provided on the Settings Page. When removing custom fields be advised that their values in navigation items will be lost. Disabling the custom fields will not affect the data and can be done with no consequence of loosing information.
178
178
179
-
Creating configuration for additional fields with the `config.(js|ts)` file should be done with caution. Config object contains the `additionalFields` property of type `Array<CustomField | 'audience'>`, where CustomField is of type `{ type: 'string' | 'boolean' | 'media', name: string, label: string, enabled?: boolean }`. When creating custom fields be advised that the `name` property has to be unique. When editing a custom field it is advised not to edit its `name` and `type` properties. After config has been restored the custom fields that are not present in `config.js` file will be deleted and their values in navigation items will be lost.
179
+
Creating configuration for additional fields with the `config.(js|ts)` file should be done with caution. Config object contains the `additionalFields` property of type `Array<CustomField | 'audience'>`, where CustomField is of type
180
+
181
+
```ts
182
+
typeCustomField=
183
+
| {
184
+
type:'string'|'boolean'|'media';
185
+
name:string;
186
+
label:string;
187
+
description?:string;
188
+
placeholder?:string;
189
+
required?:boolean;
190
+
enabled?:boolean;
191
+
}
192
+
| {
193
+
type:'select';
194
+
name:string;
195
+
label:string;
196
+
description?:string;
197
+
placeholder?:string;
198
+
multi:boolean;
199
+
options:string[];
200
+
required?:boolean;
201
+
enabled?:boolean;
202
+
};
203
+
```
204
+
205
+
When creating custom fields be advised that the `name` property has to be unique. When editing a custom field it is advised not to edit its `name` and `type` properties. After config has been restored the custom fields that are not present in `config.js` file will be deleted and their values in navigation items will be lost.
0 commit comments