Keyed post content #41073
Labels
[Block] Post Content
Affects the Post Content Block
Needs Technical Feedback
Needs testing from a developer perspective.
[Type] Enhancement
A suggestion for improvement.
This is a request for a new "key" attribute for the Post Content block, which would enable posts to have multiple post content instances identified by keys.
This issue supersedes #29173, which proposed it as a separate block rather than an attribute.
What problem does this address?
The main problem solved by this new attribute is that a post can only have one post content, but one post content may not always be sufficient.
Themes have often supported "multi-panel" content on front pages but there hasn't been a standardised way to do it. A good example diagram is available for the Pique Theme, which accomplished it in a pre-blocks environment using the customiser and extra pages. Some other themes, such as StudioPress themes, used widget areas.
This new block attribute could be a standardised way for themes to build these kinds of front pages, as well as post type templates.
What is your proposed solution?
The user would interact with a keyed post content block similarly to the un-keyed post content block, with the key being used to store the inner blocks in the postmeta table rather than in the post_content column. A prefix would be used to avoid collisions with existing postmeta keys. This would effectively let each post have multiple post content instances identified by keys. It could look something like this:
A keyed post content block could be used in a post type template, a front page template or within a query loop. If it's used in the post type template or front page template, its content can be edited using the template mode in the post editor.
The text was updated successfully, but these errors were encountered: