Node form layouts
NB! This module was meant as a proof of concept only and will not see any further development. The Vertical Tabs module provides better vertical tabs for Drupal 6, while Drupal 7 has vertical tabs out of the box (hurray!).
Description
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.
Please note that this is mainly a proof of concept, and not intended for use on production sites. It works only with the Garland and Minelli themes, not even a 100% at that. The Vertical Tabs module does vertical tabs a lot better.
For background to this module, please see these discussions:
http://drupal.org/node/185814
http://drupal.org/node/190946
http://groups.drupal.org/node/8305
http://groups.drupal.org/node/8365
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 | |
