theme_node_add_list

6 node.pages.inc theme_node_add_list($content)
7 node.pages.inc theme_node_add_list($variables)
8 node.pages.inc theme_node_add_list($variables)

Display the list of available node types for node creation.

Related topics

1 theme call to theme_node_add_list()

File

modules/node/node.pages.inc, line 28
Page callbacks for adding, editing, deleting, and revisions management for content.

Code

function theme_node_add_list($content) {
  $output = '';

  if ($content) {
    $output = '<dl class="node-type-list">';
    foreach ($content as $item) {
      $output .= '<dt>' . l($item['title'], $item['href'], $item['localized_options']) . '</dt>';
      $output .= '<dd>' . filter_xss_admin($item['description']) . '</dd>';
    }
    $output .= '</dl>';
  }
  return $output;
}

Comments

usage example

This is used on the /node/add page when a type is not set, in the node_add_page() page callback.

Login or register to post comments