Sometimes, we wished we could easily customize the listing of nodes at /node/add
See message for a use case:
http://lists.drupal.org/archives/development/2007-12/msg00064.html

At the end of the function node_add(), here:

    if (isset($item)) {
      uksort($item, 'strnatcasecmp');
      $output = t('Choose the appropriate item from the list:') .'<dl>'. implode('', $item) .'</dl>';
    }

we could do two things to facilitate the way this page can be customized.

1) we could add a hook call, sending $item by reference to contrib modules who could delete items from the list.
2) we could use a themeable function that could be overriden at the theme level.

The same code block could look this way:

    if (isset($item)) {
      $items = module_invoke_all('node_add', &$items); 
      uksort($item, 'strnatcasecmp');
      $output = theme('node_add', $items);
    }

What do you think?
If people generally agree, I could create a patch in due time.

Comments

beginner’s picture

Status: Active » Closed (duplicate)