function viewscarousel_menu in Views carousel 5
Implementation of hook_menu().
File
- ./
viewscarousel.module, line 11 - Enable the creation of dynamic loading carousel widgets with views.
Code
function viewscarousel_menu($may_cache) {
if ($may_cache) {
$items[] = array(
'path' => 'viewscarousel/js',
'callback' => 'viewscarousel_js',
'access' => user_access('access content'),
);
}
else {
foreach (viewscarousel_get_views() as $name => $view) {
$items[] = array(
'path' => $view->url . '/view',
'title' => t('View'),
'callback' => 'views_view_page',
'access' => user_access('access content'),
'weight' => -10,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[] = array(
'path' => $view->url . '/viewscarousel',
'title' => t('Carousel setup'),
'description' => t('Carousel setup.'),
'access' => user_access('administer content'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'viewscarousel_setup_form',
$name,
),
'type' => MENU_LOCAL_TASK,
'weight' => 5,
);
}
}
return $items;
}