You are here

function content_menu_menu_form_handler_menu_position_existing in Content Menu 7

Same name and namespace in other branches
  1. 8 content_menu.menu_admin.inc \content_menu_menu_form_handler_menu_position_existing()

Menu add item operation handler for a new menu item to existing content.

1 string reference to 'content_menu_menu_form_handler_menu_position_existing'
_content_menu_menu_item_target_types_alter in ./content_menu.menu_admin.inc
Actual implementation for content_menu_menu_item_target_types_alter().

File

./content_menu.menu_admin.inc, line 592
Menu Management Workflow improvements.

Code

function content_menu_menu_form_handler_menu_position_existing($form, $form_state, $item) {
  $url = content_menu_variable_get_add_existing_content_url();

  // If using default view, ensure to only goto view page if views is enabled.
  if (empty($url)) {
    content_menu_menu_form_handler_url($form, $form_state, $item);
  }
  else {
    drupal_set_message(t("You're about to create a new menu item for an existing content."));
    drupal_set_message(t('Complete the process by finding and selecting an existing content to add to the menu.'));
    drupal_goto($url, array(
      'query' => content_menu_assemble_query_string($item),
    ));
  }
}