Welcome, Guest. Please login or register.
July 29, 2010, 07:03:12 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
119279 Posts in 17081 Topics by 9086 Members
Latest Member: Emiliano
* Home Help Search Login Register
+  WebsiteBaker Community Forum
|-+  English
| |-+  Help & Support (Moderators: Argos, BerndJM)
| | |-+  "Current" Navigation
Pages: [1] Go Down Print
Author Topic: "Current" Navigation  (Read 620 times)
morenov

Offline Offline

Posts: 4


« on: April 01, 2009, 02:45:49 PM »

Hi. This problem is problem already solved somewhere on this board but i couldn't find anything (mainly because i didn't know what to search for), so maybe someone can give me a hint.

I have a horizontal Navigation with 2 levels and a bilingual website; so i managed it the following way

i call the "Main Navigation" with show_menu(1, 1, 1)
and the sub-menu with show_menu(2,2)

Now the problem is, if i click on an element of the main menu, everything works fine and he applies the "menu_current" class to it, but as soon as i push one of the sub-elements of that first level menu, the "current"-class disappears. I would want it to stay "pushed" as long as the user is in the submenu-pages of that element.

I hope i could make it clear somehow and i appreciate any help.
Can give further explanations if needed. thanks in advance

Bye

Moreno





EDIT: I just read through this and maybe it's a bit complicated, i'll try and explain Smiley

The menu structure is the following

en (English)
  • Parent 1
    • Child 1.1
    • Child 1.2
    • Child 1.3
    • Child 1.4
  • Parent 2
    • Child 2.1
    • Child 2.2
    • Child 2.3
    • Child 2.4
de (German - same structure as in English)
  • ...

Now if i click on Parent 1 (for example), that parent get's the "menu_current" class, and it displays the childs correctly. But as soon as i click on one of the Childs from Parent 1 (for example 1.2), i DO get the corresponding 1.2 page, but the Parent 1 is not "menu_curren" anymore.

Is there a workaround for this? thanks
« Last Edit: April 01, 2009, 03:04:24 PM by morenov » Logged
applepie

Offline Offline

Posts: 322


« Reply #1 on: April 01, 2009, 06:16:13 PM »

Like to help but cant understand your question. Can you post the link?
Logged
morenov

Offline Offline

Posts: 4


« Reply #2 on: April 02, 2009, 05:12:34 AM »

there is no link atm Smiley

I thought my explanation would help Smiley anyway, i'll try again.

basically the problem is that if i switch between different childs of one parent, that parent looses the "menu_current" attribute.

Let's suppose i have the architecture of my first post, and i click on link 1.2 (a child) or 1.3 or whatever child below parent "1", i want to have the link to parent "1" to be "menu_current"-class.

I'm using this menu, and i want that if i click on one of the tabs, and choose a sub-link from the parent, that the parent stays dark-blue.

I hope that i can upload my project soon, but maybe it got clearer this time.
Logged
BlackTiger

Offline Offline

Posts: 166


« Reply #3 on: April 02, 2009, 03:46:47 PM »

Perhaps using show_menu2 instead of show_menu can solve your problems?

regards
Michael
Logged
morenov

Offline Offline

Posts: 4


« Reply #4 on: April 04, 2009, 01:29:12 PM »

Thanks for the hint so far. i believe the solution could in fact be with the show_menu2 function. I just haven't got it to work properly. in case someone has in mind a template using show_menu2 similar to the the menu i'm using, i'd be glad for a link. otherwise i'll just keep trying. Thanks so far
Logged
erpe

Online Online

Posts: 2009


WWW
« Reply #5 on: April 04, 2009, 01:59:21 PM »

Hi

it is the natural of a menu-link, that it is not current, when a child is current.  grin
There could be only one link "current".
But the parent is then menu-parent. So if you want it to be blue, format the men-parent and menu-current with the same color.

Have a look at the html-output to see, what classes you have to format.

rgds

erpe
Logged

stories about What's on?
be part of the Tutorials-Project
visit the jQuery-Showroom
morenov

Offline Offline

Posts: 4


« Reply #6 on: April 05, 2009, 12:22:03 AM »

works flawlessly, thank you guys so much! Big thumbs up for the good support here
« Last Edit: April 05, 2009, 12:24:37 AM by morenov » Logged
Pages: [1] Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
-->