Fix for Loading views in hook_menu()

  1. /**
  2.  * Implementation of hook_menu().
  3.  */
  4. function cck_gallery_menu() {
  5.   $items['cck-gallery'] = array(
  6.     'title' => 'My galleries',
  7.     'description' => t('A list of galleries created by this user.'),
  8.     'page callback' => 'views_embed_view',
  9.     'page arguments' => array(variable_get('cck_gallery_list_view', 'gallery_list_page'), variable_get('cck_gallery_list_view_display', 'default')),
  10.     'access callback' => 'user_is_logged_in',
  11.   );
  12.   return $items;
  13. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.