Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

System Tags

454 sites Security covered Drupal 10–11
View on drupal.org

This module allows developers to link specific content entities to their code without needing to know their IDs. Content can be tagged with custom labels, and then referenced in modules, blocks, or theme templates by these tags, simplifying dynamic content management.

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.

Depends on

Dependencies of the latest stable release

  • field Drupal core
  • path_alias Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Oct 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 3
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
3.0.3 Stable 10–11 Mar 12, 2025
3.0.2 Stable 10–11 Oct 27, 2024
3.0.1 Stable 10–11 Oct 18, 2024