2

I've found it a little challenging to use global sets effectively, so I'm wondering how others are doing it.

The fact that a global has to be in a set has been a little tricky to deal with at the beginning a of a build, as knowing what those sets might be is hard when there aren't any globals yet.

This leaves me using sets like "Misc", "Content", and "Settings", which doesn't end up being all that helpful.

The arbitrary nature of these assignments also present a problem when using those globals, because you have to call them with their set name {{ settings.analyticsId }}.

Just thinking out loud, and wondering how others are dealing!

1

Before I create any fields I try to plan them on paper. This helps me to create my first logical groups. It doesn't prevent changes later on, but at least reduces them a little.

Also all my global sets have prefix: global__settings, global__misc...

Now if I have to create a new set and move some fields, I can do a "Search & Replace" on all templates, and thanks to the prefix I don't have to worry about replacing the wrong variables.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.