Seeking a better way to organize plugin site settings

AI-generated summary

The discussion revolves around finding an optimal way to organize plugin site settings in Discourse. Mittineague is updating the “plugin outlet locations” plugin and wants to offer granular control over 42 plugin outlet locations. However, they are unsure about how to do this without overwhelming the Admin settings.

Mittineague has considered adding a single setting or a dedicated plugin pane but is looking for a more elegant solution. They would like to add the settings to Admin -> Plugins [plugin name], but have been unable to find a way to include settings controls in the template.

eviltrout suggests that creating a custom template, controller, and server-side action might be the solution, similar to how embedding controls are handled.

I am in the process of updating my “plugin outlet locations” plugin.

AFAIK there are currently 42 plugin outlets.
I could have only one setting that enables / disables them as a whole, but I would prefer to offer more granular control of displaying the individual plugin outlet locations.

I can use the settings.yml file to add the settings to the
Admin → Settings [Plugins] pane
BUT even if it is a “developer only” plugin it seems a bit rude to add 42 settings into the mix.

Alternatively, I can use the settings.yml file to add a “button” i.e.
Admin → Settings [plugin name]
that goes to a pane with the settings.
BUT although this seems less rude, it doesn’t feel right adding a plugin button to what otherwise consists of application buttons.

What I would like to do is add the settings to
Admin → Plugins [plugin name]

After working through the “Purple Tentacle” tutorial, I am able to have the template work with the controller. And I can display settings in it.

But I have been unable to find the way to include settings controls into it.

It may be that what I have tried was just going about it the wrong way, it’s equally as likely that I tried the right way but didn’t have the right syntax needed.

A point in the right direction will be most appreciated. TIA

What you want to do is a little complicated, but what it sounds like you want is to create your own template and controller + server side action to update site settings. This is similar to what we do for embedding controls. Those are stored in site settings, but the interface is custom.