Global State Handling

Wondering if there was any concept of handling global state. Say we have something called foo that is the same across all content. Let’s also say we wanted to include foo on a page. Can we reference something in that way?

When you say 'something called foo', do you mean a variable?

You can create a single page type with constant variables in, it depends how you want to use them. I have that for global header/footer/site metadata and it works well.

1 Like

Hi @david.halewood. I agree with @marcellothearcane, I usually create a singleton Custom Type meant for all my global content (Header, Footer, global variables, etc.). Then in my project I will query this document along with the given page that I’m on.

1 Like

Cheers @marcellothearcane and @levi