0

I have developed a module, and now I would like it to make it configurable by admin users. How do I go about adding editable variables (I assume to the control panel page) and how do I later access these values in my code please?

I can't find any useful tutorials or references on this subject.

3

1 Answer 1

1

Modules in EE have no built-in way to store configuration data (unlike Extensions, in which you can store "settings").

So you'll have to create your own custom database table(s) during module installation, then write to/fetch from that table in your module control panel methods.

The module tutorial in the user guide shows how to create a new table during install, and also how to fetch data in your .mcp file, then pass that data to your view file.

I'd strongly suggest reading through the entire add-on development section of the user guide, it will give you a pretty comprehensive overview of how things work in EE add-on development.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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