Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to remove Title parameter from links
#4
1. Create a text file named mynavigation.php and paste this into it:

PHP Code:
<?php

// register plugin
$thisfile basename(__FILE__".php");
register_plugin(
    
$thisfile,
    
'My Navigation','0.1','...','#','...'
);

function 
get_my_navigation($currentpage) {
    global 
$pagesArray;
    
$menu '';
    
$pagesSorted subval_sort($pagesArray,'menuOrder');
    if (
count($pagesSorted) != 0) { 
        foreach (
$pagesSorted as $page) {
            
$sel ''$classes '';
            
$url_nav $page['url'];
            
            if (
$page['menuStatus'] == 'Y') { 
                if (
"$currentpage== "$url_nav") {
                    
$classes "current active "$page['parent'] ." "$url_nav;
                } else { 
                    
$classes trim($page['parent'] ." "$url_nav);
                }
                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']) .
                
'">'.strip_decode($page['menu']).'</a></li>'."\n";
            }
        }
    }
    echo 
exec_filter('menuitems',$menu);
}

// end of file 

2. Upload the file to your plugins folder.

3. Edit your template and change:

PHP Code:
<?php get_navigation(return_page_slug()); ?>

by:

PHP Code:
<?php get_my_navigation(return_page_slug()); ?>
Reply


Messages In This Thread
RE: How to remove Title parameter from links - by Carlos - 2012-12-01, 04:20:44



Users browsing this thread: 1 Guest(s)