Adding an operation to Content Types I'm working on a module. I've added a tab to each Content Type in hook_menu using something like:

$items['admin/structure/types/manage/%/stuff'] = array(
    'title' =&gt; 'Manage stuff',
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('stuff_content_type_stuff_form', 4),
    'access arguments' =&gt; array('administer content types'),
    'type' =&gt; MENU_LOCAL_TASK,
    'weight' =&gt; 100
);


The tab appears fine when I visit admin/structure/types/manage/article/edit, for example. However, when I view admin/structure/types to view the list of content types, I'd like to see "Manage stuff" listed as a link in the "operations" column alongside "Manage fields" and "Manage display".

Is this possible? Can someone please provide a way to do this?
The admin/structure/types page is created via the hook_menu() in the node module:

$items['admin/structure/types'] = array(
  'title' =&gt; 'Content types',
  'description' =&gt; 'Manage content types, including default status, front page promotion, comment settings, etc.',
  'page callback' =&gt; 'node_overview_types',
  'access arguments' =&gt; array('administer content types'),
  'file' =&gt; 'content_types.inc',
);


which shows that the page is generated by the node_overview_types function in content_types.inc:

/**
 * Displays the content type admin overview page.
 */
function node_overview_types() {
  $types = node_type_get_types();
  $names = node_type_get_names();
  $field_ui = module_exists('field_ui');
  $header = array(t('Name'), array('data' =&gt; t('Operations'), 'colspan' =&gt; $field_ui ? '4' : '2'));
  $rows = array();

  foreach ($names as $key =&gt; $name) {
    $type = $types[$key];
    if (node_hook($type-&gt;type, 'form')) {
      $type_url_str = str_replace('_', '-', $type-&gt;type);
      $row = array(theme('node_admin_overview', array('name' =&gt; $name, 'type' =&gt; $type)));
      // Set the edit column.
      $row[] = array('data' =&gt; l(t('edit'), 'admin/structure/types/manage/' . $type_url_str));

      if ($field_ui) {
        // Manage fields.
        $row[] = array('data' =&gt; l(t('manage fields'), 'admin/structure/types/manage/' . $type_url_str . '/fields'));

        // Display fields.
        $row[] = array('data' =&gt; l(t('manage display'), 'admin/structure/types/manage/' . $type_url_str . '/display'));
      }

      // Set the delete column.
      if ($type-&gt;custom) {
        $row[] = array('data' =&gt; l(t('delete'), 'admin/structure/types/manage/' . $type_url_str . '/delete'));
      }
      else {
        $row[] = array('data' =&gt; '');
      }

      $rows[] = $row;
    }
  }

  $build['node_table'] = array(
    '#theme' =&gt; 'table',
    '#header' =&gt; $header,
    '#rows' =&gt; $rows,
    '#empty' =&gt; t('No content types available. &lt;a href="@link"&gt;Add content type&lt;/a&gt;.', array('@link' =&gt; url('admin/structure/types/add'))),
  );

  return $build;
}


So, one way I can see to do this would be to in your module, do a hook_menu_alter() and point the page callback to a function in your module and just add to the core one's functionality, eg, something like this:

function YOURMODULE_menu_alter(&amp;$items) {

  $items['admin/structure/types']['page callback']='YOURMODULE_node_overview_types';
  unset($items['admin/structure/types']['file']); // or point it to YOURMODULE_pages.inc if need be

}


and then basically just copy the code from node_overview_types() into YOURMODULE_node_overview_types() and then put in your functionality, eg, change the colspan to 5 or 3 and add in the l() to your menu item.

NOTE:  Of course, if the node module is ever updated you'll have to keep that in mind and possibly redo this.  So, yes, since a render array is returned, you could instead modify this in any number of hook alters before the page is rendered. If you want to look into this approach, Render Arrays in Drupal 7 is a good place to start.

ADDITION:

For completeness, this is one way you could use a hook_page_alter():

function YOURMODULE_page_alter(&amp;$page) {

  if ($_GET['q']=='admin/structure/types') {

    $types = array_keys(node_type_get_types());

    $page['content']['system_main']['node_table']['#header'][1]['colspan']++;
    foreach($page['content']['system_main']['node_table']['#rows'] as $type =&gt; &amp;$row) {
      $row[]='New menu link goes here for ' . $types[$type];
    }

  }

}


instead of the hook_menu_alter() approach above.  But also, obviously, it too relies on the structure of the array returned by the node module.