Search by

drupal-eca-recipe / article_tags

jurgenhaas

Provides tags on Article content. Includes the Article content type recipe and core's Tags taxonomy recipe.

Package info

gitlab.lakedrops.com/drupal/recipes/article_tags

Type:drupal-recipe

pkg:composer/drupal-eca-recipe/article_tags

Statistics

Installs: 2

Dependents: 1

Suggesters: 0

1.0.1 2026-09-17 08:20 UTC

This package is auto-updated.

Last update: 2026-09-17 08:20:35 UTC


README

This recipe puts a field_tags entity reference field on Article content, pointing at the Tags vocabulary. It adds the free-tagging autocomplete widget to the Article form display and the tag labels to both the default and the teaser view display, and it imports the taxonomy term view so that clicking a tag leads somewhere useful.

Why this recipe exists

Drupal 11.4.0 dropped the Article and Basic page content types from the Standard profile, so new sites no longer get them out of the box. See https://www.drupal.org/node/3590571. The follow-up issue https://www.drupal.org/project/drupal/issues/3608069 restored the article_content_type, page_content_type and article_tags recipes, but on the 11.x branch only. Drupal 12 ships no successor: those recipes are gone and nothing in core replaces them.

Models in the ECA library use tagged Article content in their examples. Rather than depend on something that exists in one major version and not the next, the library ships its own copy of the three recipes.

What it includes

Two recipes are applied before this one does its own work:

  • article_content_type from this library, which provides the Article content type, its body and field_image fields and its displays. Its body field is a plain text_long field, the one deliberate difference from core's version.
  • core/recipes/tags_taxonomy from Drupal core, which provides the Tags vocabulary that field_tags references. That recipe still exists in Drupal 12, so it keeps the path form of its name.

This recipe's own composer.json requires drupal-eca-recipe/article_content_type, so Composer installs that recipe alongside this one. The Tags taxonomy recipe needs no package because it ships with core.

Configuration that is already on the site is kept rather than overwritten, so an existing Article content type, an existing Tags vocabulary or an existing display survives applying this recipe untouched.

Including it from another recipe

recipes:
  - article_tags

The bare name resolves to a sibling directory of the recipe being applied, which is where Composer installs drupal-recipe packages. Composer does not process the recipes: list on its own, so the including recipe requires only drupal-eca-recipe/article_tags in its composer.json; drupal-eca-recipe/article_content_type follows through this recipe's composer.json. Modeler API's recipe export writes that requirement since issue #3588524 in releases after 1.1.7; a hand-written recipe adds it itself.

Installation

composer require drupal-eca-recipe/article_tags
drush recipe ../recipes/article_tags
# Without Drush:
cd web && php core/scripts/drupal recipe ../recipes/article_tags
drush cr