Gutenberg: Consider renaming wp_template_part to wp_template_area

Created on 27 Aug 2020  路  5Comments  路  Source: WordPress/gutenberg

There's been a few concerns raised along the way about the clarity of wp_template_parts and whether the overlap with existing template parts in themes is good or bad. The name is not meant to surface into user space land, but it's going to leak regardless (code view, name of the block, placeholder, etc) so we might just as well use something more clear.

One idea could be to rename them to wp_template area. There's been some discussions where these units were referred to as _sections_, but I think that concept is a bit more overloaded between the HTML semantics and the intuitive notion. Template areas can be as big a header area or as small as a set of social links in a footer.

[Feature] Full Site Editing [Feature] Templates API [Type] Discussion

Most helpful comment

I'm not sure "area" would be any more obvious or recognizable than "part." The phrase "template area" doesn't make me think of an particular area of a template, but rather a place in which you put a template.

I _do_ like that "part" at least provides some commonality between existing themes and the new block-based realities.

All 5 comments

Would "region" work? It's also aria attribute.

I'm not sure "area" would be any more obvious or recognizable than "part." The phrase "template area" doesn't make me think of an particular area of a template, but rather a place in which you put a template.

I _do_ like that "part" at least provides some commonality between existing themes and the new block-based realities.

When I hear "Template Area" I immediately think of the editable area that belongs to the Template itself, the areas between template parts and post content. A 'template area' exists between the header and the post content, another 'template area' exists between the post content and the footer, etc.

I do like that "part" at least provides some commonality between existing themes and the new block-based realities.

I like this as well, but if the terminology is leaking to the end-user, I agree that it would be nice to try and find a friendlier name.

Maybe "segment" or "piece"?

There doesn't seem to be enough consensus here and it's not yet clear how or if any of these terms will be exposed in the UI. I'm going to close and we can revisit when it becomes more clear.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nylen picture nylen  路  3Comments

jasmussen picture jasmussen  路  3Comments

franz-josef-kaiser picture franz-josef-kaiser  路  3Comments

spocke picture spocke  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments