Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
node system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Dec 2007 at 13:51 UTC
Updated:
25 Jun 2008 at 07:04 UTC
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
Comment #1
beginner commentedhttp://drupal.org/node/113898