Page Layout: Blocks Field vs Array (with relationship) Field #4991
digitalbase
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
Great project! Thank you!
I am considering migrating a medium size b2b site from Contentful to PayloadCMS. I've been trying to wrap my head around the best way to make the editing experience/content reuse as straightforward/easy as possible.
Doing a 1:1 migration from Contentful would mean that every page has a richText field which allows me to embed other collections. In contentful we have prefixed all our collections with
Block
as these are the content types that are used to build up a page.The good part in this approach is that any piece of content can be reused on other pages. But the reality is that most content blocks are only used once. Side note: Conceptually I am not sure I like the idea that the editor/rich field (in any CMS) is the cleanest way to do this.
In the PayloadCMS world I believe I would have to choose between a Block Field vs an Array field (with relationships) which both come with up and downsides:
BlockField
nicely solves the fact that most content is only needed one. That entity would only exist as part of that page document. But for items that are used a lot (CTA's, customer quotes) it's a lot less elegant. I don't even think it can be done?ArrayField
is much closer to the contentful approach where a page has an array of references to other blocks. But I believe this comes with a worse editing experience where editors have to think like developers (before I can use a custom CTA i have to create that entity first).Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions