function content_menu

7.x content.module content_menu()
6.x content.module content_menu()
4.x content.module content_menu()
5.x content.module content_menu()

File

modules/content/content.module, line 7

Code

function content_menu() {

  $items = array();

  $items ["admin/config/content"] = array(
    "title" => "Content",
    "description" => "Manage content in FlightPath. Ex: Announcements, Pages, etc.",
    "page_callback" => "content_display_content_admin_list",
    "access_arguments" => array("admin_content"),
    "page_settings" => array(
      "page_has_search" => FALSE,
      "page_show_title" => TRUE,
      "page_banner_is_link" => TRUE,
      "page_hide_report_error" => TRUE,
      "menu_links" => array(
        0 => array(
          "text" => "Back to main menu",
          "path" => "admin-tools/admin",
          "query" => "de_catalog_year=%DE_CATALOG_YEAR%",
        ),
      ),
    ),
    "type" => MENU_TYPE_TAB,
    "tab_family" => "content_list",
  );




  $items ["content/delete"] = array(
    "page_callback" => "content_handle_delete_content",
    "access_arguments" => array("admin_content"),
    "type" => MENU_TYPE_CALLBACK,
  );



  /*  // We will create a new menu item for editing each content type
  // currently known to the system.
  $types = content_get_types();
  foreach ($types as $type => $details) {
    // content/add/TYPE
    $items["content/add/$type"] = array(
      "page_callback" => "fp_render_form",
      "page_arguments" => array("content_edit_content_form", "", $type, "new"),
      "access_arguments" => array("edit_$type" . "_content"),
      "page_settings" => array(
        "page_has_search" => FALSE,
        "page_banner_is_link" => TRUE,
        "page_hide_report_error" => TRUE,
        "menu_links" => array(          
          0 => array(
            "text" => "Back to main menu",
            "path" => "admin-tools/admin",
            "query" => "de_catalog_year=%DE_CATALOG_YEAR%",
          ),
          1 => array(
            "text" => "Back to content list",
            "path" => "admin/config/content",
            "query" => "de_catalog_year=%DE_CATALOG_YEAR%",
          ),          
        ),
      ),
      "type" => MENU_TYPE_TAB,
      "tab_parent" => "admin/config/content",      
    );
  }
*/


  // content/add/TYPE
  $items ["content/add/%"] = array(
    "page_callback" => "fp_render_form",
    "page_arguments" => array("content_edit_content_form", "", 2, "new"),
    "access_callback" => "content_user_access",
    "access_arguments" => array("add_type", 2),
    "page_settings" => array(
      "page_has_search" => FALSE,
      "page_banner_is_link" => TRUE,
      "page_hide_report_error" => TRUE,
      "menu_links" => array(
        0 => array(
          "text" => "Back to main menu",
          "path" => "admin-tools/admin",
          "query" => "de_catalog_year=%DE_CATALOG_YEAR%",
        ),
        1 => array(
          "text" => "Back to content list",
          "path" => "admin/config/content",
          "query" => "de_catalog_year=%DE_CATALOG_YEAR%",
        ),
      ),
    ),
    "type" => MENU_TYPE_TAB,
    "tab_parent" => "admin/config/content",
  );


  // content/CID/edit
  $items ["content/%/edit"] = array(
    "page_callback" => "fp_render_form",
    "page_arguments" => array("content_edit_content_form", "", "", 1),
    "access_callback" => "content_user_access",
    "access_arguments" => array("edit_cid", 1),
    "page_settings" => array(
      "page_has_search" => FALSE,
      "page_banner_is_link" => TRUE,
      "page_hide_report_error" => TRUE,
      "menu_links" => array(
        0 => array(
          "text" => "Back to main menu",
          "path" => "admin-tools/admin",
          "query" => "de_catalog_year=%DE_CATALOG_YEAR%",
        ),
        1 => array(
          "text" => "Back to content list",
          "path" => "admin/config/content",
          "query" => "de_catalog_year=%DE_CATALOG_YEAR%",
        ),
      ),
    ),
    "type" => MENU_TYPE_TAB,
    "tab_parent" => "admin/config/content",
  );


  $items ["content/%"] = array(
    "page_callback" => "content_view_content",
    "page_arguments" => array(1),
    "access_callback" => "content_user_access",
    "access_arguments" => array("view_cid", 1),
    "page_settings" => array(
      "page_has_search" => FALSE,
      "page_show_title" => TRUE,
      "page_banner_is_link" => TRUE,
      "page_hide_report_error" => TRUE,
      "menu_links" => array(
        0 => array(
          "text" => "Edit this content",
          "path" => "content/%CONTENT_CID%/edit",
          "query" => "",
        ),
      ),
    ),
    "type" => MENU_TYPE_TAB,
    "tab_parent" => "admin/config/content",
  );



  return $items;
}