Setup
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
The Setup module adds the ability to have scripted, setup wizards which are run automatically on the first access of a completed or upgraded site.
Think of it as a method of introducing a client to their new/updated site and having them fill out required information that may not have been available at the time of development, such as their Google Analytics tracking code or Twitter account.
This module is intended for use by Developers as the creation of your setup script is done in a profile/module/theme .info file, however the syntax is not complex and could be attempted by an adventurous site builder.
Setup was written by Stuart Clark and is maintained by Stuart Clark (deciphered) and Brian Gilbert (realityloop) of Realityloop Pty Ltd.
- http://www.realityloop.com
- http://twitter.com/realityloop
Â
Required Modules
Â
Recommended Modules
Â
Additional resources
-
Â
- Video: Setup 7.x-1.0-beta1 example
Â
How to use
Setup scripts are defined in a profile/module/theme .info file, using the standard .info syntax, similar to that of the Profiler module/library.
The structure of a setup script has two parts:
-
Options
Options allow you to define the behaviour of the Setup module, both aesthetically and functionally, but all options are optional.
Here's an example of a Setup Options configuration:
setup[options][finish_redirect] = welcome setup[options][show_cancel] = 0 setup[options][style] = drupalsetupThis will do the following:
- Redirect to http://[www.yoursite.com/path/to/drupal]/welcome on completion of the Setup script.
- Not show a cancel/skip setup link during the Setup script.
- Use the 'drupalsetup' Setup style during the Setup script.
The available Options can be found in the README.txt.
Â
-
Steps
The Steps are the guts of the Setup script, containing the type of content and the necessary settings for each Step of the Setup script.
Here's an example of a Setup Step:
setup[steps][theme][type] = theme setup[steps][theme][title] = Choose a theme setup[steps][theme][options][] = bartik setup[steps][theme][options][] = sevenThis will display a theme chooser Step allowing the set either the Bartik or Seven theme as their default site theme.
Core Steps and their expected arguments can be found in the README.txt.
Additional Step types can be defined by modules using
hook_setup_info().
Â
