Node form layouts
The node form has a lot of room for improvement in terms of usability. Based on work from the Usability group, this module was made to present different alternatives to how the node form is structured. Instead of merely looking at mockups and screenshots, we may now trial the suggestions to get a better understanding of how they work.
So far, vertical tabs (based on Bevan's mockup, again based on SteveJB's mockups) and accordion (based on couzinhub's mockup) for fieldsets have been implemented.
Note: This is mainly a proof of concept, and not intended for production use. It works only with the Garland and Minelli themes for now, although not 100%. I'll address all the issues in the issue queue once my Summer of Code project is completed (late august).
For background to this module, please see these discussions:
http://groups.drupal.org/node/8365
http://groups.drupal.org/node/8305
http://drupal.org/node/190946
Installation
- Download the module and unpack it
- Move the
nodeformfolder to yourmodulesfolder (oftensites/all/modules) - Copy the following PHP function and paste it into the template.php file of your theme (if using Garland, you will find it in
themes/garland):
<?php
/**
* Implementation of theme_fieldset(), used to achieve custom styling of
* fieldsets on the node form.
*/
function phptemplate_fieldset($element) {
// If we're currently at a node form, prepare all fieldsets (except
// input formats) for further manipulation by jQuery and CSS.
if (arg(0) == 'node' && (arg(1) == 'add' && arg(2)) || (is_numeric(arg(1)) && arg(2) == 'edit')) {
if ($element['#parents'][0] != 'format') {
$element['#attributes']['id'] = form_clean_id('edit-'. implode('-', $element['#parents']) .'-fieldset');
$element['#attributes']['class'] = 'nodeform-fieldset';
}
}
// Pass the element on to the original theme function for theming.
return theme_fieldset($element);
}
?> - Enable the module from Administer > Site building > Modules
- Go to Administer > Content management > Post settings to select the layout of the node form
Releases
| Development snapshots | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.x-dev | 2008-Mar-08 | 16.17 KB | Download · Release notes | Development snapshot | |
