Annotations Demo (Umami) Recipe
Demo recipe for sites running Drupal's Umami demo install profile. Creates a Cookbook content type that entity-references Recipe nodes, wires annotation targets onto four bundles, and imports 30 starter annotations.
What you get
New content type
| Type | Fields |
|---|---|
| Cookbook | Title, Description (text), Recipes (entity ref to Recipe nodes) |
Annotation targets
| Target | Bundle | Fields |
|---|---|---|
node__cookbook |
Cookbook | title, field_cookbook_description, field_cookbook_recipes |
node__recipe |
Recipe | title, field_summary, field_difficulty, field_cooking_time, field_preparation_time, field_number_of_servings, field_ingredients, field_recipe_instruction, field_recipe_category, field_tags, field_media_image |
taxonomy_term__recipe_category |
Recipe category | name, description |
taxonomy_term__tags |
Tags | name, description |
Annotation types: Editorial, Technical, Rules (from annotations_demo_types dependency)
Starter annotations: 30 — covering all four targets
Default role permissions: the recipe grants annotation permissions to Umami's own author and editor roles so the demo is usable out of the box, without a manual permissions step:
| Permission | Author | Editor |
|---|---|---|
| View overlay (form + view) | Yes | Yes |
| Consume editorial / rules annotations | Yes | Yes |
| Consume technical annotations | No | Yes |
| Access site-wide annotation collection | No | Yes |
| Edit / delete annotations (all types) | No | Yes |
author is deliberately denied consume technical annotations — it's the one visible, deliberate gap in the demo: log in as an author and the ? overlay simply won't appear on fields carrying technical annotations, demonstrating that consume permissions gate visibility per annotation type rather than being all-or-nothing. administer annotations / administer annotation targets / administer annotation types (all restrict access: true) are never granted by this recipe — those stay admin-only.
Requirements
- Drupal 11 / PHP 8.3+
- demo_umami install profile —
node__recipe,taxonomy_term__recipe_category, andtaxonomy_term__tagsbundles must already exist - Field storages
field_cookbook_recipesandfield_cookbook_descriptionmust not already exist on the site — the recipe will fail if they do
Installation
Install Drupal 11 with Umami profile, per above.
drush recipe modules/contrib/annotations/recipes/annotations_demo_umami
drush cr
Where to look
After applying the recipe:
- Content types: Admin → Structure → Content types → Cookbook
- Annotation targets: Admin → Config → Annotations → Targets
- Annotations UI: open any Recipe or Cookbook node for editing — field-level
?triggers appear on each annotated field (annotations_overlayis installed automatically by this recipe)
Teardown
Recipes are one-way. To remove, delete the Cookbook content type, the four annotation targets, and the imported annotation entities.
See also
- Root module README — full suite overview
- annotations_demo_types recipe — shared annotation types dependency
- annotations_demo recipe — equivalent standalone demo for fresh installs
- annotations_demo_lgd recipe — LocalGov Drupal bolt-on
- annotations_demo_webform recipe — onboarding webform bolt-on