1<?php
2
3require_once (DOKU_PLUGIN.'/indexmenu/syntax/indexmenu.php');
4/*
5*  Returns submenu tree for specified namespace
6*
7*  @param string $ns namespace title
8*  @param string $sort sorting mode
9*  @return {String} html markup for the submenu
10*  @access public
11*/
12function indexmenu_getsubmenu ($ns,$s) {
13
14  global $conf;
15  $opts = array($ns, array('level' => 1, // get only 1st level
16                    'ajax' => true,
17                    'js' => false,
18                    'navigation' => false,
19                    'sort' => $s
20                   ));
21
22  $im = & new syntax_plugin_indexmenu_indexmenu();
23  return preg_replace(array("#^<ul[^>]+>#i","#</ul>$#i"),"",$im->_indexmenu($opts));
24}
25