Problem/Motivation

In the 2.0 version of section library, settings were added to modify the label display for the two template types (section and template). However the configuration does not change the output of the Type field in section library views.

Steps to reproduce

  1. Customize the labels for "Section" and "Template" template types on /admin/config/content/section-library
  2. Visit /admin/content/section-library and observe that the "Type" column still displays the hardcoded option labels from the entity.

Test Steps

  1. Install the MR branch of section library on a fresh site
  2. Customize the labels for "Section" and "Template" template types on /admin/config/content/section-library
  3. Visit /admin/content/section-library and observe that the "Type" column now displays the customized labels.

OR

  1. In an existing site with the dev branch of section library
  2. Customize the labels for "Section" and "Template" template types on /admin/config/content/section-library
  3. Edit the section library view. Click on "Section library template: Type (Type)" and choose the new "Section library template type" option for formatter. Click Apply. Save the view.
  4. Visit /admin/content/section-library and observe that the "Type" column now displays the customized labels.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jastraat created an issue. See original summary.

jastraat’s picture

Status: Active » Needs review

I created a custom field formatter for the "type" base field on section library template.

This field formatter can then be used in the default section library view, so I updated the default view config.

I did not add an update hook for this since not all sites may want to use the new field formatter in their existing views.

jastraat’s picture

Issue summary: View changes
jasongose’s picture

Status: Needs review » Reviewed & tested by the community

This works for me :)

  • jastraat committed fae5dc15 on 2.0.x
    Issue #3508158 by jastraat: Update display of "type" field in views to...
jastraat’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.