Any suggestions on how to model this type of content?

default discord avatar
derosul
2 months ago
4

I'm currently refactoring a static react website to a Payload with content blocks.



The screenshot seems fairly simple, but I'm not entirely sure how to include the inline / columned images without making it overly complex. afaik I can't do inline images with slate....



Any suggestions on how to approach this?

  • default discord avatar
    notchr
    2 months ago

    Hmm, I typically have a Global for each page



    And then i use groups to break the sections apart



    For instance, I 'd have a Partner section. The section would include a field for "Title", "Content", and then an array of Media

  • discord user avatar
    jarrod_not_jared
    Payload Team
    2 months ago

    Why not just make an "ImageGrid" Block?

  • discord user avatar
    tylandavis
    Payload Team
    2 months ago

    I typically do the same as Jarrod. I'll make an ImageGrid or ImageRow Block, and then give it some fields to customize the styling of it (alignment, padding, etc), in case I want to use it in other parts of my site.



    A simpler way could be to have a block called "PartnerLogos" and make it a basic array or relationship, and then just handle the styling on the frontend side of things.

  • default discord avatar
    derosul
    2 months ago

    Hmm, I'm already using a "content" block as seen in the Payload demo for this. where i define columns and their contents.



    I guess i could embed blocks within there as well. Interesting...


    Thanks for the ideas @notchr @jarrod_not_jared @tylandavis 😄

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.