Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

system_tags

427 sites Security covered
View on drupal.org

This modules provides the bridge between content and code. It allows developers to use specific entities (like the news-overview page) in their module without knowing the ID of that piece of content.

Use cases:

  • I don't want to save the node id of the homepage in config, instead I tag a node with "Homepage" and System Tags will take care of the rest.
  • I want to show a list of popular news items in the sidebar on the news overview page, so I tag a node with "News overview" and configure the "System Tags"-condition of that list block to use the "News overview"-System Tag.
  • The url of an article should start with the alias of the overview page (/articles/my-news-article). This can be done by using the correct token in the Pathauto pattern for articles.

Setup

The setup is rather easy:

  • Add a reference field to the 'System Tag'-entity (eg. field_page_system_tag on Node type 'Page');
  • Mark a certain entity with a tag via the field you just created;
  • Take a look in Drupal\system_tags\Config\SystemPageConfigOverrider::loadOverrides for how to use this module in your code.

Twig support

A Twig function is included: system_tag_url. It allows 3 parameters: the System Tag ID (required), the entity type (default: node) and an array of options that will be passed to the \Drupal\Core\Entity\EntityInterface::toUrl()-function. Eg. <a href="{{- system_tag_url('homepage') -}}">.

Token support

For every entity type which has a reference field to System Tag, a token will be available. The structure will be the following: system_tags:ENTITY_TYPE--TAG_ID. Eg. [system_tags:node--homepage].

Theming support

When you enable the submodule system_tags_theme, all the configured System Tags, set for the current node, will be available as suggestions. This allows a themer to override the node.html.twig-template, based on the System Tag. Eg. node--system-tag--homepage.html.twig.

Activity

Total releases
1
First release
Mar 2025
Latest release
1 year ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
3.0.3 Stable Mar 12, 2025