You are here

function taxo_faceted_navigation_menu in Taxonomy Facets 7

Implements hook_menu().

File

./taxo_faceted_navigation.module, line 17
Taxo Faceted Navigation module code.

Code

function taxo_faceted_navigation_menu() {
  $items = array();

  // First argumet in the listing url, as specified in the admin form.
  $first_arg = variable_get('taxo_faceted_navigation_first_argument', 'items_list');

  // The node listing page, where filters can be allied.
  $items[$first_arg] = array(
    'page arguments' => array(
      1,
    ),
    'page callback' => 'taxo_faceted_navigation_print_landing_page',
    'type' => MENU_CALLBACK,
    'access arguments' => array(
      'view taxo facets',
    ),
  );

  // Admin settings page.
  $items['admin/config/search/tax_faceted_nav'] = array(
    'title' => 'Taxo Faceted Navigation',
    'description' => 'Taxo Faceted Navigation module configuration',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'taxo_faceted_navigation_admin_settings',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'taxo_faceted_navigation.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );

  // Add taxo faceted block page.
  $items['admin/structure/block/add-taxofacet-block'] = array(
    'title' => 'Add taxofacet block',
    'description' => 'Add a new taxo faceted block.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'taxo_faceted_navigation_add_block_form',
    ),
    'access arguments' => array(
      'administer blocks',
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'taxo_faceted_navigation.admin.inc',
  );
  return $items;
}