Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
where is get_navigation output set?
#1
Hi,
I'm new to GS, setting up a portfolio site for myself, and find that I would like to change the assignment of the "current" class in the navigation menu. The default output for get_navigation(return_page_slug()) is to assign the "current" class to the <li>, but I want it assigned to the <a> instead. So my question is: where do I change this setting? I've looked at various files in the admin and data folders but I can't really spot where the setting is made.

Another reason for wanting to find this is that I have another site brewing where it might be more desireable to use a different setup than a <ul> for the navigation, so if I can find where the navigation output is set, it'll be easier to modify according to needs.

A little direction, please?
Thank'ye
There's nothing more foolish than a man chasing his hat.
Reply
#2
There is no real setting other than the actual code. So the only way to change this is to rewrite the get_navigation-function. (Much like I did when I was not happy with the menu myself.)

You’ll find get_navigation() in /admin/inc/theme_functions.php. More specifically it’s line 336 you’d want to change:
Code:
$menu .= '<li class="'. $classes .'" ><a href="'. find_url($page['url'],$page['parent']) . '" title="'. $page['title'] .'">'.$page['menu'].'</a></li>'."\n";
You might need to move some variables around though, as $classes contains more than just the current class.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#3
Tackar! Thanks! Just what I was looking for.
Smile
There's nothing more foolish than a man chasing his hat.
Reply




Users browsing this thread: 1 Guest(s)