-
Notifications
You must be signed in to change notification settings - Fork 0
Using patterns as Field Formatter
Stephen Mustgrave edited this page Aug 12, 2024
·
1 revision
In this example we are going to use a field formatter to turn a "body" field into a USWDS Summary box https://designsystem.digital.gov/components/summary-box/.
- Go to the view display we are going to use the formatter on, example
admin/structure/types/manage/article/display
- For "Body" select "Component (per item).
- Then in the formatter settings select "Summary box" which will show the props/slots for this component.
- Filling in the slots with the field options of a "Body" field, see below
- Save everything/
- Go to https://drupal-govcon-2024-ui-patterns.ddev.site/node/13
- See how the body field is rendering as a summary box.