A module I am working on needs to be able to display a table sorted by default using a column that is not to be visually displayed.
This is easy to do with the following code
$sql .= tablesort_sql($header, $hidden_sort_column);
This has a minor problem that the tablesort theming code adds a sort direction arrow to the default column when it cant find the correct column in the header.
To workaround this, the attached patch allow URLs to provide the hidden order, or it can be defined in the module code using:
if (!isset($_GET['order']))
$_GET['order'] = t($hidden_label);
| Comment | File | Size | Author |
|---|---|---|---|
| drupal-table-order-hidden.patch | 632 bytes | zeroj |
Comments
Comment #1
magico commentedComment #2
LAsan commentedDoes this patch still applies to current version.
Feature request moving to cvs.
Comment #3
lilou commentedPatch no longer applied.
Comment #4
dave reidThis is no longer necessary with DBTNG.