Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
link in the menu are relative
#4
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);

NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply


Messages In This Thread
link in the menu are relative - by Oleg06 - 2013-10-07, 20:01:08
RE: link in the menu are relative - by shawn_a - 2013-10-07, 22:53:10
RE: link in the menu are relative - by Oleg06 - 2013-10-07, 23:56:53
RE: link in the menu are relative - by shawn_a - 2013-10-07, 23:59:37
RE: link in the menu are relative - by Oleg06 - 2013-10-08, 00:08:08
RE: link in the menu are relative - by shawn_a - 2013-10-08, 00:12:59
RE: link in the menu are relative - by Oleg06 - 2013-10-08, 00:20:39
RE: link in the menu are relative - by shawn_a - 2013-10-08, 00:23:04
RE: link in the menu are relative - by Oleg06 - 2013-10-08, 00:31:11
RE: link in the menu are relative - by Oleg06 - 2013-10-08, 01:06:13
RE: link in the menu are relative - by shawn_a - 2013-10-08, 06:20:27
RE: link in the menu are relative - by Oleg06 - 2013-10-08, 07:18:15
RE: link in the menu are relative - by shawn_a - 2013-10-08, 07:59:53
RE: link in the menu are relative - by Oleg06 - 2013-10-08, 15:56:28
RE: link in the menu are relative - by Oleg06 - 2013-10-12, 21:06:41
RE: link in the menu are relative - by D.O. - 2013-11-03, 16:40:34
RE: link in the menu are relative - by Oleg06 - 2013-11-03, 17:20:27
RE: link in the menu are relative - by D.O. - 2013-11-03, 18:48:25
RE: link in the menu are relative - by Oleg06 - 2013-11-03, 19:13:18



Users browsing this thread: 6 Guest(s)