2013-10-08, 00:08:08
Thank you very much remains to get rid of this
Code:
<a href="\/
(2013-10-07, 23:59:37)shawn_a Wrote: Change theme_functions
get_naviagtion
This add the param type ( default relative )
PHP Code:/**
* Get Main Navigation
*
* This will return unordered list of main navigation
* This function uses the menu opitions listed within the 'Edit Page' control panel screen
*
* @since 1.0
* @uses GSDATAOTHERPATH
* @uses getXML
* @uses subval_sort
* @uses find_url
* @uses strip_quotes
* @uses exec_filter
*
* @param string $currentpage This is the ID of the current page the visitor is on
* @param string $classPrefix Prefix that gets added to the parent and slug classnames
* @param string $type "relative" or "full" links
* @return string
*/
function get_navigation($currentpage,$classPrefix = "", $type='relative') {
$menu = '';
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder');
if (count($pagesSorted) != 0) {
foreach ($pagesSorted as $page) {
$sel = ''; $classes = '';
$url_nav = $page['url'];
if ($page['menuStatus'] == 'Y') {
$parentClass = !empty($page['parent']) ? $classPrefix.$page['parent'] . " " : "";
$classes = trim( $parentClass.$classPrefix.$url_nav);
if ("$currentpage" == "$url_nav") $classes .= " current active";
if ($page['menu'] == '') { $page['menu'] = $page['title']; }
if ($page['title'] == '') { $page['title'] = $page['menu']; }
$menu .= '<li class="'. $classes .'"><a href="'. find_url($page['url'],$page['parent'],$type) . '" title="'. encode_quotes(cl($page['title'])) .'">'.strip_decode($page['menu']).'</a></li>'."\n";
}
}
}
echo exec_filter('menuitems',$menu);
}