You are here

function onlyone_menu_link_alter in Allow a content type only once (Only One) 7

Implements hook_menu_link_alter().

File

./onlyone.module, line 119
Allows to define if a content type must have more than one node in the site.

Code

function onlyone_menu_link_alter(&$item) {
  if ($item['page callback'] == 'onlyone_add_page') {

    // Assigning /admin/content as parent.
    $item['plid'] = 9;
  }
}