Allow Views' Serialized field handler to customize rendering using twig templates

Created on 16 December 2015, almost 9 years ago
Updated 6 February 2023, almost 2 years ago

Problem/Motivation

Views comes with a built-in serialized field handler (Drupal\views\Plugin\views\field\Serialized), which is really great for database columns where data is serialized. However, this field handler plugin only allows limited options for rendering. It is difficult to implement custom rendering of the serialized field.

Proposed resolution

Add an option to use a custom twig template to render the serialized field

Remaining tasks

Patch
Reviews
Commit

User interface changes

A new option in Views UI to use custom twig template to render a serialized field

API changes

None

Data model changes

New "custom_template" key in the views.field.serialized data schema

Feature request
Status

Needs work

Version

10.1

Component
Views 

Last updated about 2 hours ago

Created by

🇳🇬Nigeria almaudoh

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

    With the schema update we will need an upgrade path forward for existing sties.
    Also this was previously tagged for tests in #2 which still needs to happen.

Production build 0.71.5 2024