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

Comments

Robrecht Jacques’s picture

StatusFileSize
new565 bytes

Using "node_name_list()" in "block.module".

Robrecht Jacques’s picture

StatusFileSize
new715 bytes

Same for "system.module".

Robrecht Jacques’s picture

StatusFileSize
new671 bytes

And "taxonomy.module"

Robrecht Jacques’s picture

StatusFileSize
new913 bytes

And "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

Robrecht Jacques’s picture

Status: Active » Closed (works as designed)

I guess it's not. Closing it.