In Frontend Notice Field
Tell editors that a part of the website is hardcoded in the frontend
A UI field that shows a notice banner in the admin panel, telling editors that this part of the website is hardcoded in the frontend and must be changed by a developer. It stores no data.
The default text is translated to English, Norwegian, Swedish and Danish.


Usage
import { inFrontendNoticeField } from '@adsign/payload-adsign-plugin';
export const Pages: CollectionConfig = {
fields: [
{
type: 'tabs',
tabs: [
{
name: 'heroSection',
label: 'Hero',
fields: [inFrontendNoticeField({ name: 'heroNotice' })],
},
],
},
],
};Options
| Option | Type | Default | Description |
|---|---|---|---|
name | string | - | Field name. Must be unique within the same fields array |
message | string | Record<string, string> | - | Overrides the default text. Use an object keyed by language to translate it |
admin | UIField['admin'] | - | Payload admin options, e.g. condition, position or width |
Examples
With a custom message:
inFrontendNoticeField({
name: 'menuNotice',
message: 'The menu is managed by a developer.',
})With a translated custom message:
inFrontendNoticeField({
name: 'menuNotice',
message: {
en: 'The menu is managed by a developer.',
nb: 'Menyen styres av en utvikler.',
},
})