Few content tags fields per entity

Created on 21 February 2023, over 1 year ago
Updated 14 March 2023, over 1 year ago

Problem/Motivation

Only one field based on content tags can be added to an entity.

Steps to reproduce

  1. Enable the "Social Album" and "Social Tagging" modules.
  2. Add a field with the label "Album tags" and machine name "field_tags" based on the "Content tags" taxonomy vocabulary to the "Album" content type.
  3. Add the following code to the "social_album.module" file:
    /**
     * Implements hook_social_tagging_type_alter().
     */
    function social_album_social_tagging_type_alter(array &$items): void {
      $items['node']['sets'][] = [
        'bundles' => ['album'],
        'field' => 'field_tags',
        'label' => t('Album content tags'),
        'group' => 'tags',
        'wrapper' => FALSE,
        'weight' => 1.1,
      ];
    }
    
  4. Check the "Note type: Album" checkbox on the "Tags settings" page.
  5. When you open the album creation/edit page then you should see the "Album content tags" section which contains the "Album tags" field.

Proposed resolution

Provide a list of fields based on this taxonomy term vocabulary and they support the split option.

📌 Task
Status

Fixed

Version

11.8

Component

Tagging

Created by

🇺🇦Ukraine chmez 🇺🇦 Lviv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024