Jump to heading Naming convention
Jump to heading Fields
Field naming has a huge impact on developer experience.
- Must have a prefix in machine name
- For re-usable fields across multiple bundle, use
commonas prefix. - All other fields must be prefixed with the machine name of the bundle.
- In case bundle's machine name is too long, use an appropriate short code for the bundle
- For re-usable fields across multiple bundle, use
Jump to heading Paragraph
Paragraph machine name convention are as follows,
- Use 'Singular, Noun'
- Prefix machine name for fields with the bundle name
Example:
- Paragraph "Image"
- machine name : image
- fields
- field_image_media
- field_image_citation
- Paragraph: "Heading"
- machine name : heading
- fields
- field_heading_text
- field_heading_id
- field_heading_level
Jump to heading Libraries
- Use Drupal's machine name (snake_case_format) for library names as well as file names.