Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
li to not include "current" class?
#1
Hi all, just installed GetSimple and so far so good with importing my theme in.

There's just one issue I've come across so far and that is with the navigation. In the HTML mark-up I had the following:

Code:
<ul class="Navigation">
<li class="current"><a href="#" title="Homepage"><b>Home</b></a></li>
<li><a href="#" title="Link 1"><b>Link 1</b></a></li>
<li><a href="#" title="Link 2"><b>Link 2</b></a></li>
<li><a href="#" title="Link 2"><b>Link 2</b></a></li>
<li><a href="#" title="Link 2"><b>Link 2</b></a></li>
</ul>

This used CSS for the a:hover of the links to have the same CSS as "current" which gave a rollover effect.

Currently with GetSimple the list's current class would change to class="current index", class="current about" etc. Is there anyway I can stop this to just get it back to "current"?

I've found the following PHP code in theme_functions.php in admin/inc, though I'm hopeless with PHP and haven't a clue how to change it.

Code:
if ($page['menuStatus'] == 'Y') {
                if ("$currentpage" == "$url_nav") { $classes = "current". $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']) . '" title="'. strip_quotes($page['title']) .'">'.$page['menu'].'</a></li>'."\n";
            }

MTIA
Reply
#2
can't you define the classes which you do not want just empty? so that they don't have any effect?
Why not?
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#3
TheController Wrote:Currently with GetSimple the list's current class would change to class="current index", class="current about" etc. Is there anyway I can stop this to just get it back to "current"?

What's the problem with this? The li has two classes, current and index. If you don't define a rule for class index, it has no impact.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#4
Thanks for the replies.

I managed to work out what was going wrong. I forgot that for the rollover I used a restyled <b> tag so I've added that in and it's working now.

One issue though ... if I go to "Airport Information" at the top, it still keeps "Home" as the current link in the navigation bar despite being on /airport-information/ ... any ideas why this is happening?

Also mvlcek - absolutely excellent plug-ins, thank you very much for them! I think I'm going to end up using them all.
Reply
#5
TheController Wrote:One issue though ... if I go to "Airport Information" at the top, it still keeps "Home" as the current link in the navigation bar despite being on /airport-information/ ... any ideas why this is happening?

Your relevant css rules are li.index ... instead of li.current ...
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#6
Thanks mvlcek, I changed .current to .index in the CSS late last night to try and fix it and forgot to change it back.

Pretty obvious error, now fixed - thanks for the help ;o)

Best wishes
Reply




Users browsing this thread: 1 Guest(s)