Adding id="active_t_menu" to Top Menu?
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
- Pesto
- Joomla! Enthusiast
- Posts: 175
- Joined: Sat Sep 17, 2005 2:47 am
- Location: In a basement in New Jersey
- Contact:
Adding id="active_t_menu" to Top Menu?
Hi.
I want to achieve the same active state for links that are duplicated in the Top Menu and the Main Menu.
I know Main Menu puts in id="active_menu" for the section you are on. How do I get Top to follow suit?
Thanks
Pesto
I want to achieve the same active state for links that are duplicated in the Top Menu and the Main Menu.
I know Main Menu puts in id="active_menu" for the section you are on. How do I get Top to follow suit?
Thanks
Pesto
http://www.totalhosting.com
Serving the Internet since 1998
Serving the Internet since 1998
- kai920
- Joomla! Guru
- Posts: 542
- Joined: Sun Sep 04, 2005 3:59 pm
- Location: Hong Kong
Re: Adding id="active_t_menu" to Top Menu?
Hi would like to know this too... want to emulate Joomla's tab menu, for example FORUMS is highlighted right now.
What's the easiest way to achieve this with the included madeyourweb template?
What's the easiest way to achieve this with the included madeyourweb template?
-
- Joomla! Ace
- Posts: 1477
- Joined: Thu Aug 18, 2005 9:06 am
- Contact:
Re: Adding id="active_t_menu" to Top Menu?
The id="active_menu" is assigned to the menu item which is currently selected (according to the Itemid parameter)... it doesn't matter which menu module it is... but they would need to show the same menu somehow. See the thread about my extended menu:
http://forum.joomla.org/index.php/topic,10389
TomT did what you are probably interested in. (The fix I send just him is not needed if you set in the module parameters the menu type to "Tree List").
(There is also another thread... just don't have the link handy)
Edit: here is the other thread: http://forum.joomla.org/index.php/topic ... cseen.html
http://forum.joomla.org/index.php/topic,10389
TomT did what you are probably interested in. (The fix I send just him is not needed if you set in the module parameters the menu type to "Tree List").
(There is also another thread... just don't have the link handy)
Edit: here is the other thread: http://forum.joomla.org/index.php/topic ... cseen.html
Last edited by de on Wed Oct 12, 2005 9:58 pm, edited 1 time in total.
- kai920
- Joomla! Guru
- Posts: 542
- Joined: Sun Sep 04, 2005 3:59 pm
- Location: Hong Kong
Re: Adding id="active_t_menu" to Top Menu?
Thanks for the reply, I'll give your module a go and see if it helps
- kai920
- Joomla! Guru
- Posts: 542
- Joined: Sun Sep 04, 2005 3:59 pm
- Location: Hong Kong
Re: Adding id="active_t_menu" to Top Menu?
de:
I downloaded your module, haven't really had time to play with it, but upon changing the topmenu to mod_exmenu, my menu is displayed vertically and is not aligned?
Also would you mind sending me the "fix"? thanks.
I downloaded your module, haven't really had time to play with it, but upon changing the topmenu to mod_exmenu, my menu is displayed vertically and is not aligned?
Also would you mind sending me the "fix"? thanks.
-
- Joomla! Ace
- Posts: 1477
- Joined: Thu Aug 18, 2005 9:06 am
- Contact:
Re: Adding id="active_t_menu" to Top Menu?
The menu style defaults to "Vertical" (not because it is preferred, but just to behave as the builtin mainmenu module by default).kai920 wrote: I downloaded your module, haven't really had time to play with it, but upon changing the topmenu to mod_exmenu, my menu is displayed vertically and is not aligned?
Also would you mind sending me the "fix"? thanks.
Look at the menu style of your previous (unpublished) topmenu menu module... it is probably set to "Horizontal" or "Flat List"... if it is the later, then just set the menu style to "Tree List" and "Split Menu" to "1"... that way you don't really need the fix.
If you really think you need the fix anyway... email me and I reply with it. (One day I will probably take the time to configure CVS/SVN properly)
- kai920
- Joomla! Guru
- Posts: 542
- Joined: Sun Sep 04, 2005 3:59 pm
- Location: Hong Kong
Re: Adding id="active_t_menu" to Top Menu?
ok, i changed "menu class suffix" to -nav and that solved the issue of my menu not displaying horizontally...
now to re-read the links you gave me to try to figure out how to keep the menu items highlighted
now to re-read the links you gave me to try to figure out how to keep the menu items highlighted
- suthram
- Joomla! Intern
- Posts: 76
- Joined: Mon Oct 03, 2005 8:09 pm
- Location: Washington D.C., USA
Re: Adding id="active_t_menu" to Top Menu?
Guys,
Since you have played a lot with the extended menu, I have a question:
I have many sub level items and I want my menu to be such that, if I click on a child of a parent menu item, the page refreshes to show the target page with only the children items in the navigation. I do NOT want the parent items to show as they would in a regular menu. So for example, if I have:
Home
Fruit
Apple (slideout)
Orange (slideout)
Banana (slideout)
Kiwi (slideout)
Vegetable
Contact Us
And I click on "kiwi", then the "Kiwi" page loads and the menu will be:
Apple
Orange
Banana
Kiwi
Kiwi 1 (slideout)
Kiwi 2 (slideout)
Kiwi 3 (slideout)
The parent items disappear.
Similarly, if I now click on "Kiwi 1" then, the page reloads to go to "Kiwi 1" page and the menu becomes:
Kiwi 1
Kiwi 2
Kiwi 3
I know this is easy to do with only one parent level and one child level. I have as many as 6 levels of submenu items. Please advise on how I need to tweak the "Extended Menu" to operate as such.
Thank you!
Suthram
Since you have played a lot with the extended menu, I have a question:
I have many sub level items and I want my menu to be such that, if I click on a child of a parent menu item, the page refreshes to show the target page with only the children items in the navigation. I do NOT want the parent items to show as they would in a regular menu. So for example, if I have:
Home
Fruit
Apple (slideout)
Orange (slideout)
Banana (slideout)
Kiwi (slideout)
Vegetable
Contact Us
And I click on "kiwi", then the "Kiwi" page loads and the menu will be:
Apple
Orange
Banana
Kiwi
Kiwi 1 (slideout)
Kiwi 2 (slideout)
Kiwi 3 (slideout)
The parent items disappear.
Similarly, if I now click on "Kiwi 1" then, the page reloads to go to "Kiwi 1" page and the menu becomes:
Kiwi 1
Kiwi 2
Kiwi 3
I know this is easy to do with only one parent level and one child level. I have as many as 6 levels of submenu items. Please advise on how I need to tweak the "Extended Menu" to operate as such.
Thank you!
Suthram
-
- Joomla! Ace
- Posts: 1477
- Joined: Thu Aug 18, 2005 9:06 am
- Contact:
Re: Adding id="active_t_menu" to Top Menu?
Hi Suthram,
I may add such an option in a future version (not sure yet)...
What you could do at the moment is to have three modules... for the second module you set "Begin With Level" to "1", for the third module you set it to "2"... and then you set the first module to show on the mainlevel items (Home, Fruit, Vegetable, Contact Us) and the second to show on the 1st sub level menu items (Apple, Orange, Banana, Kiwi, ...) and the third to show on the 2nd sublevel menu items (Kiwi 1. ...)
That may be too much work for large sites though.
I hope that helps,
Daniel
I may add such an option in a future version (not sure yet)...
What you could do at the moment is to have three modules... for the second module you set "Begin With Level" to "1", for the third module you set it to "2"... and then you set the first module to show on the mainlevel items (Home, Fruit, Vegetable, Contact Us) and the second to show on the 1st sub level menu items (Apple, Orange, Banana, Kiwi, ...) and the third to show on the 2nd sublevel menu items (Kiwi 1. ...)
That may be too much work for large sites though.
I hope that helps,
Daniel
- suthram
- Joomla! Intern
- Posts: 76
- Joined: Mon Oct 03, 2005 8:09 pm
- Location: Washington D.C., USA
Re: Adding id="active_t_menu" to Top Menu?
Thank you for the fast response, Daniel. I will look into this and see what I can do.
I have about 7 levels. What do you think about this? :-
If I have 4 levels, I can make a copy of the extended menu module - let's call them exmenu1 and exmenu2. I could have exmenu1 begin at level 1 and have it create another module within the menu to show level 2 items only. Then, I could have exmenu2 to start at level 3 and have it create another module within the menu to show level 4 items only. And so on and so forth ...
I could have exmenu1 publish only on the pages with correspond to level 1 and 2 items. And similarly, have exmenu2 publish only on the pages corresponding to level 3 and 4 items so that the two exmenus never overlap across pages.
I hope I'm making sense. Please let me know if there is another menu module out there that I can use. Thanks.
Pradeep
I have about 7 levels. What do you think about this? :-
If I have 4 levels, I can make a copy of the extended menu module - let's call them exmenu1 and exmenu2. I could have exmenu1 begin at level 1 and have it create another module within the menu to show level 2 items only. Then, I could have exmenu2 to start at level 3 and have it create another module within the menu to show level 4 items only. And so on and so forth ...
I could have exmenu1 publish only on the pages with correspond to level 1 and 2 items. And similarly, have exmenu2 publish only on the pages corresponding to level 3 and 4 items so that the two exmenus never overlap across pages.
I hope I'm making sense. Please let me know if there is another menu module out there that I can use. Thanks.
Pradeep
-
- Joomla! Ace
- Posts: 1477
- Joined: Thu Aug 18, 2005 9:06 am
- Contact:
Re: Adding id="active_t_menu" to Top Menu?
Yes, I think you understood what I was trying to say... with 7 levels and each having probably a few items that seem like a good bit of work.
I am sorry, but I don't know the other menu modules that well... Infinity, SWMenu and Lxmenu seem to be some of the good... but whether they are able to provide what you are looking for.
I am sorry, but I don't know the other menu modules that well... Infinity, SWMenu and Lxmenu seem to be some of the good... but whether they are able to provide what you are looking for.
-
- Joomla! Intern
- Posts: 74
- Joined: Mon Sep 05, 2005 7:45 pm
Re: Adding id="active_t_menu" to Top Menu?
hi
basically i have been meaning to hack this in myself
should be fairly simple
like you said, it uses id="active_menu"
the downside is that each id is unique so there can be only one
so changing the code to produce class="active_menu"
and then changing all '#active_menu' to '.active_menu' in the css would be a good start
you could then make multiple items active
I personally want to make a tab menu across the top
and have a menu per each tab and make the tab stay active
(even after you click on a menu item in the 'left' position)
without having to make a custom template per tab (which is what the joomla site is probaly doing)
basically i have been meaning to hack this in myself
should be fairly simple
like you said, it uses id="active_menu"
the downside is that each id is unique so there can be only one
so changing the code to produce class="active_menu"
and then changing all '#active_menu' to '.active_menu' in the css would be a good start
you could then make multiple items active
I personally want to make a tab menu across the top
and have a menu per each tab and make the tab stay active
(even after you click on a menu item in the 'left' position)
without having to make a custom template per tab (which is what the joomla site is probaly doing)
-
- Joomla! Ace
- Posts: 1477
- Joined: Thu Aug 18, 2005 9:06 am
- Contact:
Re: Adding id="active_t_menu" to Top Menu?
Ok, I did not understand that you planned to hack it by yourself.
About the active_menu id... that I already built in... it uses mainlevel_active/sublevel_active.
For the other request... you could of course try to hack my menu module... almost in the end (1428) you will see a line like this:
If you make a similiar call at the right place like this:
than it should show something like you requested.
$menuLoader->activeIds is an array with the menu items on the path to the current menu item (currently starting with the current menu item).
I will most certainly add a parameter to the module to allow such behavior... I just don't know when. If you decide to donate to a charity or me it may influence my time scale :P
About the active_menu id... that I already built in... it uses mainlevel_active/sublevel_active.
For the other request... you could of course try to hack my menu module... almost in the end (1428) you will see a line like this:
Code: Select all
$menuNode =& $menuLoader->menuNodeByIdMap[$menuLoader->activeIds[$key - $depthIndex]];
Code: Select all
$menuNode =& $menuLoader->menuNodeByIdMap[$menuLoader->activeIds[1]];
$menuLoader->activeIds is an array with the menu items on the path to the current menu item (currently starting with the current menu item).
I will most certainly add a parameter to the module to allow such behavior... I just don't know when. If you decide to donate to a charity or me it may influence my time scale :P
-
- Joomla! Ace
- Posts: 1477
- Joined: Thu Aug 18, 2005 9:06 am
- Contact:
Re: Adding id="active_t_menu" to Top Menu?
The just released version 0.3.1 has the parameter "Begin With Current Item Level" which may be used for this purpose.
(I am just not sure that it gives a good user experience... you may also want to make use of "Show Parent")
(I am just not sure that it gives a good user experience... you may also want to make use of "Show Parent")
- suthram
- Joomla! Intern
- Posts: 76
- Joined: Mon Oct 03, 2005 8:09 pm
- Location: Washington D.C., USA
Re: Adding id="active_t_menu" to Top Menu?
Daniel,Fatal error: Call to undefined function: getnulldate() in /usr/www/users/picnet/clients/harbour/modules/mod_exmenu.php on line 152
I installed your latest version of the extended menu and it resulted in this error on the frontend. Are there certain parameters for which it is compulsory to declare a value?
- suthram
-
- Joomla! Ace
- Posts: 1477
- Joined: Thu Aug 18, 2005 9:06 am
- Contact:
Re: Adding id="active_t_menu" to Top Menu?
Hi Suthram,suthram wrote:Daniel,Fatal error: Call to undefined function: getnulldate() in /usr/www/users/picnet/clients/harbour/modules/mod_exmenu.php on line 152
I installed your latest version of the extended menu and it resulted in this error on the frontend. Are there certain parameters for which it is compulsory to declare a value?
- suthram
I guess I lost compatibility with previous Joomla/Mambo versions... I don't know since when that function is available. But upgrading to the latest Joomla 1.0.3 should solve that problem. (Alternatively you could modify the file to use '0000-00-00 00:00:00' in place... in a future release I will restore backward compatibility)
Daniel
- suthram
- Joomla! Intern
- Posts: 76
- Joined: Mon Oct 03, 2005 8:09 pm
- Location: Washington D.C., USA
Re: Adding id="active_t_menu" to Top Menu?
Daniel,
Great news! I got the menu item to work with your modified extended menu module. It looks great and it does the job perfectly! Thank you for all your work.
Suthram
Great news! I got the menu item to work with your modified extended menu module. It looks great and it does the job perfectly! Thank you for all your work.
Suthram
-
- Joomla! Apprentice
- Posts: 19
- Joined: Sat Feb 18, 2006 9:12 pm
- Location: St. Paul, MN USA
menu shows "child items" at same level as "parent" upon clicking on "child"
de, your extended menu module is very handy. I'm having a bit of trouble figuring out how to do the following, however. I am using the "top menu" module for my site and the extended menu appears in the "left" position.
Here is what currently happens:
1. click item in the top menu
2. left menu opens and shows all child items as expected
Ex.
Parent item 1 (top menu item)
Menu displays like this:
Parent item 1 (top menu)
How do I make is so when I click on "Child 1" it does not appear at the same level as "Parent 1?" I want the menu to appear always like my example in step 2. Please let me know if this description is unclear.
Joomla 1.0.5
Extended Menu 1.0.2
Extended menu settings:
Menu Class Suffix:
Module Class Suffix:
Enable Cache: no
Menu name: topmenu
Source Type: Menu
Source value:
Show section: default
Show category: default
Show content item: default
order: ording (asc)
default itemid:
Menu style: css tree
menu view plugin name:
show menu icons: no
expand menu: yes
expand until level: 2
maximum depth: 10
hide first entry: no
show parent: yes
parent menu item:
begin with current item level: no
begin with level: 1
split menu: 1
menu count: 2
enable query cache: no
parse access key: strip markup
link title: yes
level class: default
active menu class: no
element id: no
enable menu template: yes
template name: menu.html
skipping images section.....
select list submit text: go
hide submit button: never
skipping misc....
Here is what currently happens:
1. click item in the top menu
2. left menu opens and shows all child items as expected
Ex.
Parent item 1 (top menu item)
- Child 1
- Child 2
Menu displays like this:
Parent item 1 (top menu)
- Child 1
- Child 2
How do I make is so when I click on "Child 1" it does not appear at the same level as "Parent 1?" I want the menu to appear always like my example in step 2. Please let me know if this description is unclear.
Joomla 1.0.5
Extended Menu 1.0.2
Extended menu settings:
Menu Class Suffix:
Module Class Suffix:
Enable Cache: no
Menu name: topmenu
Source Type: Menu
Source value:
Show section: default
Show category: default
Show content item: default
order: ording (asc)
default itemid:
Menu style: css tree
menu view plugin name:
show menu icons: no
expand menu: yes
expand until level: 2
maximum depth: 10
hide first entry: no
show parent: yes
parent menu item:
begin with current item level: no
begin with level: 1
split menu: 1
menu count: 2
enable query cache: no
parse access key: strip markup
link title: yes
level class: default
active menu class: no
element id: no
enable menu template: yes
template name: menu.html
skipping images section.....
select list submit text: go
hide submit button: never
skipping misc....
-
- Joomla! Ace
- Posts: 1477
- Joined: Thu Aug 18, 2005 9:06 am
- Contact:
Re: menu shows "child items" at same level as "parent" upon clicking on "child"
I think in your case the module parameters "Split Menu" and "Menu Count" are cousing it (mainly the first)... they cause it to split the menu within the same module and hence starting with the first level again.... set "Split Menu" to something high (or empty should probably work too).reneeccski wrote: How do I make is so when I click on "Child 1" it does not appear at the same level as "Parent 1?" I want the menu to appear always like my example in step 2. Please let me know if this description is unclear.
I hope that helps.
-
- Joomla! Apprentice
- Posts: 19
- Joined: Sat Feb 18, 2006 9:12 pm
- Location: St. Paul, MN USA
Re: Adding id="active_t_menu" to Top Menu?
Thanks, de.
You are right about the split menu being the problem. We changed it from 1 to 2 and it now works great!
You are right about the split menu being the problem. We changed it from 1 to 2 and it now works great!