Pages + Slices for... everything?

:wave:t3: hello from LA. I have a content modelling question that I could use some perspective on.

I'm building a rather larger e-commerce site. And there are various types we're using Page, Gallery, Project. I appreciate that these are all separate types. But my Page document has ~20 slices all set up, and it seems heavy keeping all those in sync.

I'm building Galleries right now - but wondering why I don't just make it a Page type with a Gallery slice. Gives the client the ability to make an interesting header, or drop in some related products down below.

Doing this I guess you would Tag it gallery and query them out correctly on the Gatsby side.

Not ideal, but what a real bummer would be is copying over 10+ slices from Page over to Gallery and re-setting up all my fragments, as they come down as different types.

Any suggestions here? Thanks :slight_smile:

Hello @beamer, welcome to the Community!

I think the best approach would. be, as you said, having just one Page custom type and getting rid of the Gallery type. Then you can Reuse a Slice in Another Custom Type by saving it in the Slice library. Then, yes, updating your fragments will become necessary, whenever you make changes to your Custom types this step is required so that Gatsby knows exactly what's on the schema.

Think of your documents as full pages in your website, and Slices are the components or blocks that make it up. So you can create a Page document that can have a
Gallery Slice or not, it's up to you!

Do you think that having many Slices in just one Custom type isn't very user friendly? Cause at the end you only use what you need in each one.

This issue has been closed due to inactivity. Flag to reopen.