function faq_menu in Frequently Asked Questions 6
Same name and namespace in other branches
- 5.2 faq.module \faq_menu()
- 5 faq.module \faq_menu()
- 7.2 faq.module \faq_menu()
- 7 faq.module \faq_menu()
Implements hook_menu().
File
- ./
faq.module, line 72 - The FAQ module allows users to create a FAQ page, with questions and answers displayed in different styles, according to the settings.
Code
function faq_menu() {
$items = array();
$items['faq'] = array(
'title' => 'Frequently Asked Questions',
'page callback' => 'faq_page',
'access callback' => 'user_access',
'access arguments' => array(
'view faq page',
),
'weight' => 1,
);
$items['faq/list'] = array(
'title' => 'List',
'page callback' => 'faq_page',
'access callback' => 'user_access',
'access arguments' => array(
'view faq page',
),
'weight' => -10,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['faq/order'] = array(
'title' => 'Order',
'description' => 'Allows the user to configure the order of questions and answers on a FAQ page.',
'file' => 'faq.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'faq_order_settings_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer faq order',
),
'type' => MENU_LOCAL_TASK,
'weight' => -8,
);
$items['faq/%'] = array(
'title' => 'Frequently Asked Questions',
'page callback' => 'faq_page',
'page arguments' => array(
1,
),
'access callback' => 'user_access',
'access arguments' => array(
'view faq page',
),
'type' => MENU_CALLBACK,
);
$items['faq/%/list'] = array(
'title' => 'List',
'page callback' => 'faq_page',
'page arguments' => array(
1,
),
'access callback' => 'user_access',
'access arguments' => array(
'view faq page',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['faq/%/order'] = array(
'title' => 'Order',
'description' => 'Allows the user to configure the order of questions and answers on a FAQ page.',
'file' => 'faq.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'faq_order_settings_form',
1,
),
'access callback' => 'user_access',
'access arguments' => array(
'administer faq order',
),
'type' => MENU_LOCAL_TASK,
'weight' => -8,
);
$items['admin/settings/faq'] = array(
'title' => 'Frequently Asked Questions',
'description' => 'Allows the user to configure the layout of questions and answers on a FAQ page.',
'file' => 'faq.admin.inc',
'page callback' => 'faq_settings_page',
'access callback' => 'user_access',
'access arguments' => array(
'administer faq',
),
);
$items['admin/settings/faq/general'] = array(
'title' => 'General',
'description' => 'Allows the user to configure the header and descriptive text for the FAQ page.',
'file' => 'faq.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'faq_general_settings_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer faq',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/settings/faq/questions'] = array(
'title' => 'Questions',
'description' => 'Allows the user to configure the layout of questions and answers on a FAQ page.',
'file' => 'faq.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'faq_questions_settings_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer faq',
),
'type' => MENU_LOCAL_TASK,
'weight' => -9,
);
$items['admin/settings/faq/categories'] = array(
'title' => 'Categories',
'description' => 'Allows the user to configure the layout of questions and answers using categories on a FAQ page.',
'file' => 'faq.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'faq_categories_settings_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer faq',
),
'type' => MENU_LOCAL_TASK,
'weight' => -8,
);
return $items;
}