Looking at:
- admin/node (the filter selection list)
- admin/help#node
- admin/node/configure/types
- node/add
there is always a list of content types appearing. However, these lists are not ordered alphabetically, especially not when you define for example a flexinode type called "url" ("url" will appear between "book page" and "forum topic" for example, because we are sorting on "flexinode-1", while it makes more sense to have a "book page", "forum topic", "url" ordening similar as what appears in the "create content" menu).
The attached patch creates a new function "node_name_list()" which is basically a "node_list()", but sorts this list on the "node_invoke($type, 'node_name')". The patch then uses this function on the four places above.
There are other places where a list of "node types" is given which should also be sorted alphabetically I believe. Eg in "taxonomy.module". If this patch is applied to "node.module" we could "fix" these other places too using the same "node_name_list()" function.
Kind regards,
Robrecht
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | blogapi.module.patch | 913 bytes | Robrecht Jacques |
| #3 | taxonomy.module_8.patch | 671 bytes | Robrecht Jacques |
| #2 | system.module_7.patch | 715 bytes | Robrecht Jacques |
| #1 | block.module_2.patch | 565 bytes | Robrecht Jacques |
| node_name_list.patch | 2.97 KB | Robrecht Jacques |
Comments
Comment #1
Robrecht Jacques commentedUsing "node_name_list()" in "block.module".
Comment #2
Robrecht Jacques commentedSame for "system.module".
Comment #3
Robrecht Jacques commentedAnd "taxonomy.module"
Comment #4
Robrecht Jacques commentedAnd "blogapi".
I think I have all core modules in "drupal-4.6.0" now. These patches will make all listings of content types for selection or just in a enumeration to appear in the same order.
Useful?
Robrecht
Comment #5
Robrecht Jacques commentedI guess it's not. Closing it.