Skip to content

Allow blocks to be renamed via a block template #77436

Description

@eric-michel

What problem does this address?

Block renaming support was added for most blocks over a year ago, and it's really great for making the purpose of blocks clear to our users.

It would be incredibly helpful if custom names could be applied to blocks within a block template as well. For instance, we're creating a top level container block that exists on every page. At the start of that container, I would like a Spacer block renamed to "Space Below Header" and one at the end of that container called "Space Above Footer". Best I can tell, this is not currently possible.

What is your proposed solution?

Add block renaming support to the block template array. Maybe something like:

            array( 'core/spacer', array(
                'name' => 'Space Below Header',
            ) ),

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions