[development] Best practices: Config settings

Alan Pritt alan at humte.com
Wed Jan 2 01:53:45 UTC 2008


killes wrote:

 > my question is: Where should contrib module authors put config  
options
 > for their modules?

I've been thinking about this problem a lot lately. I'm yet to
come up with a good answer, unfortunately. But...

The short answer would be to add it to the module configuration
screen. If we don't, users will have to hunt for settings pages and
even if they know to look at the '/admin/by-module' page, we are
still forcing them to move from page to page in order to set up a
module. This is a huge waste of user time.

However, it's not a totally satisfactory answer. We consistently
place permissions and block-assignments to alternate screens,
which confuses beginners. But it is handy to have them all in
one place. And a module like gmap or cck addons necessarily
have to place the UI deep into the core admin screens.

A partial answer is to direct people to the help page once they
install a module because this lists all the pages that the module
alters. But it's not the most elegant of solutions and is obviously
not applicable to any current Drupal releases.

For now I'd say keep it in your module config page if it makes
sense to put it there. And maybe make a reference to it elsewhere.
It's not the optimal solution, but I think it will cause the least
confusion in most circumstances.

Long term I think we should be looking at presenting the UI in
different contexts depending on how the user will be thinking
about the problem. For example: 'I need to configure this
module' vs. 'I need to make my site perform faster'. But I'm still
a bit vague how that would best be implemented.

Alan Pritt (alpritt)


More information about the development mailing list