Hi there!
Sometimes I have pieces of information that need to live in different pages, custom types, or slices.
Let’s make a quick example.
In many e-commerce projects (mine included), we work with seasonal events like Christmas, Valentine’s Day, Easter, etc. In these cases, there’s often a last day to order that needs to be displayed in multiple places: on a page, inside a custom type, and of course inside one or more slices.
While working with Shopify, I noticed they provide “centralized variables” (metaobjects and metafields) that can be used almost everywhere in the theme.
Right now, my workaround is to create a configuration custom type, where I define these kinds of “key–value” parameters and then hard-code the fetch at the top of the app so they’re available inside slices.
It would be great to set up something directly at the Prismic level that can be referenced from different places. That way, thanks to centralization, if something changes (for example: “Hey, the last date is not the 8th anymore, it’s the 22nd”), you don’t have to go crazy hunting down every place where that value was used.
What do you think?