function attachment_links_menu in Attachment Links 6
Same name and namespace in other branches
- 7 attachment_links.module \attachment_links_menu()
Implementation of hook_menu().
Return value
Array of menu items.
File
- ./
attachment_links.module, line 92 - The Attachment Links module provides permanent links to files attached to a node. A single, easy-to-remember URL can be used to retrieve the preferred (canonical) or newest version of a file regardless of how many versions of that file have been…
Code
function attachment_links_menu() {
$items = array();
$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' => 'user_access',
'access arguments' => array(
'view uploaded files',
),
);
$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' => 'user_access',
'access arguments' => array(
'view uploaded files',
),
);
return $items;
}