Using module configuration parameters
When you start using the module, you may notice it can serve several purposes. You could, for instance, use the module to display all the projects that you are working on, on a home page. Or you may use it to show the projects related to a specific customer.
Sometimes you would like to show only three projects, and other times you may want to change the ordering of the list. Developing the same module and changing the database query is not practical, and we will not respect the DRY principle as we will have the same code but a different limit for the list query.
So, let’s give our module some parameters that our users can change to make the module fit their needs. To add parameters to our module configuration, we need to create a new section in the XML manifest file following the form definition we saw in Chapter 4.
Following the first paragraph of this section, let’s create the following parameters:
- Customers: This...