You are here

function attachment_links_menu in Attachment Links 7

Same name and namespace in other branches
  1. 6 attachment_links.module \attachment_links_menu()

Implements hook_menu().

File

./attachment_links.module, line 16

Code

function attachment_links_menu() {
  $items['node/%node/attachment'] = array(
    'title' => 'Authoritative Attachment',
    'description' => 'The canonical or "lightest" attached file.',
    'type' => MENU_CALLBACK,
    'page callback' => 'attachment_links_retrieve',
    'page arguments' => array(
      1,
      'authoritative',
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'view',
      1,
    ),
  );
  $items['node/%node/attachment/newest'] = array(
    'title' => 'Latest Attachment',
    'description' => 'The most recently attached file.',
    'type' => MENU_CALLBACK,
    'page callback' => 'attachment_links_retrieve',
    'page arguments' => array(
      1,
      'newest',
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'view',
      1,
    ),
  );
  return $items;
}