Move Custom block library to Content

Created on 21 March 2017, over 7 years ago
Updated 10 July 2023, 12 months ago

Problem/Motivation

The Block Layout page is for site-building tasks. Any configuration there is exported in the configuration management.

But the Custom block library page is a page to create and edit content. Administrators on a production website need to be able to edit this content - but usually they should not be able to change block layout etc at the same time.

There already is an issue to provide more granular block permissions, or at least a separate permission that only allows to edit an existing block ( Add more granular block content permissions Fixed and Add "edit block $type" permissions Fixed ). This would solve part of the problem because users then can't break the site.

However, users still require access to the whole Structure and Configuration part of the site to navigate to the Custom block library tab on the Block layout page.

Proposed resolution

  • Make the list of "custom" blocks a local task (tab) on the Content page (/admin/content), not Block layout (/admin/structure/block).
  • Change the path from /admin/structure/block/block-content to /admin/content/block-content. This affects breadcrumbs.
  • Change the page and tab titles from "Custom block library" to "Custom blocks".
  • Change the "empty" text from "There are no custom blocks available." to "No custom blocks available."
  • Update help text (hook_help() and Help Topics).
  • Update tests for the changed paths and interface text.

Some related issues:

Remaining tasks

  1. .
  2. .

User interface changes

Update the help text on the following pages:

  • /admin/help/block_content
  • /admin/help/topic/block.overview
  • /admin/help/topic/block_content.add

Parent page

These screenshots show the parent page, with the Administration menu, path, breadcrumbs, and local tasks (tabs).

Before

After

Child page

These screenshots show the child page (list of custom blocks), with the Administration menu, path, breadcrumbs, and other local tasks (tabs).

Before

After

API changes

None

Data model changes

None

Feature request
Status

Fixed

Version

10.1

Component
Block content 

Last updated 5 days ago

Created by

🇳🇱Netherlands ifrik

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

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.

Production build 0.69.0 2024