Global settings for site wide options

Hello!

I’ve just made the switch from Wordpress to working with Prismic and building headless websites.

Since I’m from the Wordpress side of developing I have alot of experience working with Advanced Custom Fields which is the core of Prismic aswell.

However, using ACF in wordpress we had the option to make fields appear in an options page. Fields and settings that did not belong to any page or content but to the website in general. Global settings you could say.

Is there a way to create this functionally? Am I missing something?

Hi @cevoid, thanks for reaching out about this. What I usually do is create a Singleton Custom Type specifically for all my site-wide content. It’s usually where I put the content I need for the header and footer, but you can add anything you need.

Then I make sure to retrieve the site-wide Prismic document along with the document(s) for whichever page is being viewed and I have everything I need to render the page.

Hi @levi, thanks for the quick answer!

Alright, that sounds like the smartest way to do it. Makes sense!

Maybe you guys should create a help page about that on your website. Guessing a lot of people will google “Prismic global settings / options”, like I did :slight_smile: Thanks!

@cevoid Thanks, I’m glad that this will work for you. I’ll look into getting an article added to the docs to help others with this in the future :slight_smile: