Jump to:
| Project: | Features |
| Version: | 7.x-1.0-beta6 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Hi,
First, i'm quite new to drupal and not so good at english, so sorry if this has been already discussed and have obvious answers.
I've read Features documentation and saw some nice videos, i think i understood what were Features main goals.
But there's one think i'm not sure about: is it possible (and if so would it be a good idea) to use Features to create a kind of custom "starter distribution".
When i start a new drupal project there's some basic configurations that i always have to manually set. For exemple i always install & activate Pathauto / Token / Transliteration modules then configure it always the same way (this could already be one feature), then i always install / activate / configure Wysiwyg Module with TinyMce Module, then deactivate some core modules that i never use, etc...
So the question is: is that a good idea to group all thoses features in a single one that would set my base configurations "in one click" ?
Thanks !
Comments
#1
Hello jmix! Welcome to Drupal and the confusing landscape of everything-in-code development.
Distributions at their most elemental are a customized installation workflow, default enabled modules, and perhaps a theme. They often also handle some basic configuration, but that's a cheat that is sometimes worth it, sometimes not.
Features is intended as a way of exporting one use case/collection of functionality at a time from the database and into code. For sophisticated features, this often involves adding any custom code you need to more thoroughly integrate those "configurations" with the rest of your site to realize a vision.
"Content Creation Experience" kind of stuff might well go in a single feature defining things like WYSIWYG, but I wouldn't put all your defaults into one feature. You want each feature to be somewhat swappable, just as you could theoretically replace the WYSIWYG module for any other wysiwyg-provider module, your wysiwyg configuration module should also be swappable.
If you have some additional basic configurations you always want to have, that's ground for a personal/organizational custom module that handles the "Other" stuff that doesn't cleanly fit anywhere else.
Now, all of that is a matter of best practices. You *can* export a lot of stuff in a Feature. At some point it becomes unweildy, especially if you are using the UI. The best practices emphasize agility in how you evolve a site or distribution, if you've got a dozen items of universal configuration, you could have that be your organizational custom module.
Personally, I would build an Install Profile and a few features as the basis for all work. Doing such is on my roadmap.
#2
Hello Grayside !
Thanks a lot for your clear answer !
What you are saying here kind of confirms what i understood since i wrote this post.
The best way to do what i'm searching to do seems to be a combination of "custom install Profile" and some "features".
I now have to work on the "profile" thing, but from what i saw it doesn't seems to be very complicated to set simple things.
Thanks again !
#3
The problem of "how to capture default configuration settings" and make them available as default is an unsolved problem still.
As for creating an install profile, you may want to take a look at drush make (especially drush make-generate) and the profiler module (i've never used it, just know it exists)
Also take a look at how nodestream (another install profile) handles its default configuration. (Its using a relatively obsure defaultconfig module).