GetSimple Support Forum

Full Version: where is get_navigation output set?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 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.
Tackar! Thanks! Just what I was looking for.
Smile