You are here

function og_menu_overview_page in Organic Groups Menu (OG Menu) 6.2

Same name and namespace in other branches
  1. 6 og_menu.module \og_menu_overview_page()
  2. 7.2 og_menu.pages.inc \og_menu_overview_page()

Menu callback which shows an overview page of all the custom menus in user's groups and their descriptions.

1 string reference to 'og_menu_overview_page'
og_menu_menu in ./og_menu.module
Implementation of hook_menu().

File

./og_menu.module, line 376
Integrates Menu with Organic Groups. Lots of menu forms duplication in OG context.

Code

function og_menu_overview_page($node) {
  $result = db_query("SELECT * FROM {menu_custom} m INNER JOIN {og_menu} om ON m.menu_name = om.menu_name WHERE om.gid = %d ORDER BY title", $node->nid);
  $content = array();
  while ($menu = db_fetch_array($result)) {
    $menu['href'] = 'node/' . $node->nid . '/og_menu/' . $menu['menu_name'];
    $menu['localized_options'] = array();
    $menu['title'] = filter_xss_admin($menu['title']);
    $menu['description'] = filter_xss_admin($menu['description']);
    $content[] = $menu;
  }
  return theme('admin_block_content', $content);
}