ClientConfig v2 introduces context settings

ClientConfig was one of my first extras, back in 2012. It lets you define site-wide settings that the client can easily update, without having to use the complicated system settings interface. With over 25,000 downloads, it still meets a need people have.

Today I'm excited to introduce ClientConfig 2.0, with a new multi-context mode to give you the ability to manage settings for contexts, too.

How does it work?

When you install ClientConfig 2.0, you'll be asked during the setup if you want to use the global mode or context aware mode. Global mode is what you're used to from 1.x: the administrator sets up settings, the editor edits their values, and you can access them with setting tags or through the MODX API in PHP.

If you enable context aware mode, that same functionality is still there, but you also get a context selector, in the top right of the client view. When you choose a context, the form is reloaded with the values for the other context, and values are updated just for that context.

It's also possible to choose a context by adding a &context parameter to the url, useful for QuickStart Buttons users.

Where can I get ClientConfig 2.0?

Right now, you can get ClientConfig 2.0.0-rc1 from the modmore package provider. It's available only on the pre-releases channel, so people can choose if they want the stable 1.4 version, or the new 2.0 which may still contain bugs. Learn how to a the pre-releases channel here.

In a few weeks, if no major issues were reported, we'll promote ClientConfig to stable and also release it on MODX.com.

Any other new features in 2.0?

Excellent question!

You can now use chunk or snippet tags inside the field options for the select field type, allowing you to make dynamic dropdowns. Great for selecting resources, for example.

The file and image field types will now also prefix the media source paths to the outputted URL, so you no longer have to add those directly in your templates.

Enjoying ClientConfig? Please consider a donation

I'd like to extend special thanks to the 4 people that pledged a $250 bounty to make this feature possible. Thank you Jamison, Jan, Sebastian and Hugo!

ClientConfig is free and open source, so anyone can use it at no cost. It does take time and effort to build, so if you can afford to, please consider making a donation.