You are here

function hook_menu_block_blocks in Menu Block 7.2

Same name and namespace in other branches
  1. 7.3 menu_block.api.php \hook_menu_block_blocks()

Return a list of configurations for menu blocks.

Modules that want to have menu block configurations exported to code should provide them using this hook.

See also

menu_tree_build() for a description of the config array.

1 invocation of hook_menu_block_blocks()
menu_block_get_exported_blocks in ./menu_block.module
Fetch all exported menu blocks.

File

./menu_block.api.php, line 31
Hooks provided by the Menu Block module.

Code

function hook_menu_block_blocks() {
  return array(
    // The array key is the block id used by menu block.
    'custom-nav' => array(
      // Use the array keys/values described in menu_tree_build().
      'menu_name' => 'primary-links',
      'parent_mlid' => 0,
      'title_link' => FALSE,
      'admin_title' => 'Drop-down navigation',
      'level' => 1,
      'follow' => 0,
      'depth' => 2,
      'expanded' => TRUE,
      'sort' => FALSE,
    ),
    // To prevent clobbering of the block id, it is recommended to prefix it
    // with the module name.
    'custom-active' => array(
      'menu_name' => MENU_TREE__CURRENT_PAGE_MENU,
      'title_link' => TRUE,
      'admin_title' => 'Secondary navigation',
      'level' => 3,
      'depth' => 3,
    ),
  );
}