Guy Incognito Posted June 25, 2021 Share Posted June 25, 2021 Hi all, Title says it all really. Have created a little site-specific module and want to give a non-superuser access to edit the module settings. What's the best way to go about this. I've added a nav item to the the setup menu using the getModuleInfo() array in the module file but this just returns a 'The process returned no content.' message. Should I be redirecting this the config screen or rendering the config screen into this page somehow? Thanks, JIncidentally the icon I choose for the module isn't rendering - do I just choose the name from FontAwesome for this? Link to comment Share on other sites More sharing options...
Guy Incognito Posted June 25, 2021 Author Share Posted June 25, 2021 After reading up further I see I should have built my own UI on a Process page rather than using a module config screen to achieve this. 🙈 I never realised there was such a disconnect between using module config screens and the UI of Process modules. It would be awesome if there was a way to optionally pull module config screen into the Process page view as most of the simple modules I need to make for sites don't need more than what the config screen provides other than granting permissions to non super users. Don't know if anyone has come up against this or created a work-around? Link to comment Share on other sites More sharing options...
Macrura Posted June 26, 2021 Share Posted June 26, 2021 Settings Factory was created precisely for this use case - no need to create a module, module config; You can also keep your fields in your module with default values, and let your site admins override those in the Settings Factory "settings". To put it simply, if you are building out module-like code on the front end, but need to expose settings for things to your editors, Settings Factory has the ability to create unlimited settings pages, each with their own permissions... 2 Link to comment Share on other sites More sharing options...
Guy Incognito Posted June 28, 2021 Author Share Posted June 28, 2021 Hi @Macrura thanks for this - module looks fantastic and not sure how I managed to pass it by until now! One quick question - can you export settings to other sites? One big advantage of coding modules is obviously the portability. Link to comment Share on other sites More sharing options...
Macrura Posted June 28, 2021 Share Posted June 28, 2021 yep - since the settings definitions are defined in json or php files they can be copied from site to site and then setup in the admin (simply create a page under /admin/ and then set the process as SettingsFactory, then type in the path to the settings definition file). In terms of exporting actual settings, like the values, I have thought about that as well, as it would be nice to be able to back up the settings for any given single settings configuration. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now