I'm migrating a website from Wordpress to nextjs/paylaodcms and I have tons of "global translations" - e.g. header/footer/buttons/contact phone numbers/... - components are not part of any collection.
My approach would be to create a collection, called Translations with a unique name e.g. header.contact.phone
and I fetch that on each nextpage and pass it to a context.
My question is - is there a better advice / strategy?
Yes. Have you looked at globals?
https://payloadcms.com/docs/configuration/globals
You can find an example in the public demo: https://github.com/payloadcms/public-demo/blob/master/src/globals/MainMenu.ts
I hope that helps.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.