The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: id=active_menu ***
PostPosted: Thu Sep 01, 2005 5:41 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Aug 21, 2005 9:57 pm
Posts: 23
Location: Montréal
Hi,

    I'm working on a project with mambo 4.5.3 and I got a problem with one generated id of mambo.

    It's in the menu, with the mainlevel and sublevel class. When we click on one of those link (a mainlevel link), Mambo generate an id called "active_menu". That id created by mambo is really useful because I can design it in the css and obtain a "selected link" effect in my design (the background change, etc.). When I click on one another mainlevel link that Id change position to the other div and it's wonderful like that because it really give us the "Selected Menu" effect with my css design. More than with a a:visited or a:active propreity in css. (Active is just when the mouse is pressed and visited is for the rest of your life... yeah well, until your cache is refresh)

      My problem is when I begin to click on sublevel links. The id="active_menu" disappear from the mainlevel class link and move to the sublevel class link. Why? Can I do something to keep the id="active_menu" on the mainlevel class link?

    Why when I click on the mainlevel link it give me that /a=href: .... class="mainlevel" id="active_menu"/  /a=href: .... class="sublevel"/

    and when I click on the sublevel link it gie me that  /a=href: .... class="mainlevel"/  /a=href: .... class="sublevel"  id="active_menu"/

      All my css design propriety follow that id="active_menu" so my design effect disappear from my main link and appear on the sub link.

      Unfortunately I didn't upload on the web

Thanks for your help

DivAll

p.s. If anybody is a Css Geek, do you know another solution to give me that "Selected menu Effect" in css. Like a:focus or a Rollover Div? We had some problem with the a:focus.


Top
 Profile  
 
 Post subject: Re: id=active_menu ***
PostPosted: Thu Sep 01, 2005 7:40 am 
Hello,

I might have the solution for you, but would it be possible to post a link? I'm not sure I thoroughly understand.

Visualizing might help me.


Top
  
 
 Post subject: Re: id=active_menu ***
PostPosted: Thu Sep 01, 2005 12:22 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Thu Aug 18, 2005 1:14 pm
Posts: 71
Location: Las Palmas de Gran Canaria
Think that is logic that you actual active menu have id="activemenu". If your active menu now is in the main level (menu with class "mainlevel") and you click in a submenu, the new menu active is that entry in submenu, ergo the id assignation is correct.

I need to see what kind of effect do you want to obtain in order to give you some css&js tips.

_________________
------------------------------------------------------------------------
www.e-josafat.com


Top
 Profile  
 
 Post subject: Re: id=active_menu ***
PostPosted: Thu Sep 01, 2005 12:49 pm 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Thu Aug 18, 2005 4:35 pm
Posts: 2860
Location: Cheshire, England
I do not know how you can keep the "active_menu" id on the mainlevel menu link but if you do not want your mainlevel active css to also go on your sublevel when active you should be able to create specific css properties for the sublevel active state by combining your css selectors

e.g.

#active_menu .sublevel { styling for sublevel when active }

_________________
Do you want the answer to be as vague as your question?


Top
 Profile  
 
 Post subject: Re: id=active_menu ***
PostPosted: Thu Sep 01, 2005 12:54 pm 
This is what I was thinking toubkal, seems we're on the same track, but like I said I would like to see if indeed this is what divall is looking for.

/********** Active SubLevel Links **********/
a.sublevel#active_menu {
  color                : black;
}

a.sublevel#active_menu:hover {
  color                : black;
}


Top
  
 
 Post subject: Re: id=active_menu ***
PostPosted: Thu Sep 01, 2005 2:02 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Sep 01, 2005 6:23 am
Posts: 12
Let say that you have a vertical menu with only one mainlevel:

Mainlevel_1

And that when you click on it (Mainlevel_1), it expands:

Mailevel_1
Sublevel_1
Sublevel_2
Sublevel_3

At this time Mainlevel_1 has the id="activemenu", and its background-color becomes red.

I think that what DivAll is looking for is a way to keep the background color of Mailevel_1 red even when one of the sublevel has been selected.


Top
 Profile  
 
 Post subject: Re: id=active_menu ***
PostPosted: Thu Sep 01, 2005 2:20 pm 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Thu Aug 18, 2005 4:35 pm
Posts: 2860
Location: Cheshire, England
Yes, we were giving info on how to style the submenu separately when active.

I searched the old forum and found this:

http://forum.mamboserver.com/showthread.php?t=25243

which may be an answer.

_________________
Do you want the answer to be as vague as your question?


Top
 Profile  
 
 Post subject: Re: id=active_menu ***
PostPosted: Thu Sep 01, 2005 2:23 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Sep 01, 2005 6:23 am
Posts: 12
I'm going to look, right now,  at the link you gave.

in the meantime here is a complement of information:

What I’m trying to do.

I have a “fake horizontal” menu made of 3 different vertical menus, as follow:
The background of each MainLevels is white.

Menu1_Title                  Menu2_Title                      Menu3_Title
Menu1_Mainlevel_1          Menu2_Mainlevel_1            Menu3_Mainlevel_1         

When I click on “Menu2_Mainlevel_1” its background becomes red, and the sublevels appear. The sublevels background color is red, in way that it makes a red box.

Menu1_Title                  Menu2_Title                      Menu3_Title
Menu1_Mainlevel_1          Menu2_Mainlevel_1            Menu3_Mainlevel_1         
                                    Menu2_Sublevel_1         
                                    Menu2_Sublevel_2
                                    Menu2_Sublevel_3

And when I click on one of the sublevels, I would like the background color of the Menu2_Mainlevel_1 to stay red. And that without using “Link visited” because if I click on  Menu3_Mainlevel_1 and have this:


Menu1_Title                  Menu2_Title                      Menu3_Title
Menu1_Mainlevel_1        Menu2_Mainlevel_1            Menu3_Mainlevel_1         
                                                                          Menu3_Sublevel_1         
                                                                          Menu3_Sublevel_2
                                                                          Menu3_Sublevel_3
                                                                          Menu3_Sublevel_4
                                                                          Menu3_Sublevel_5

And I want the « red box effect» to be on the Menu3 and the background color of Menu2_Mainlevel_1 white again.


Top
 Profile  
 
 Post subject: Re: id=active_menu ***
PostPosted: Thu Sep 01, 2005 4:39 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Sep 01, 2005 6:23 am
Posts: 12
Hey ! toubkal .... thanks for the link... it works !!!!

The only thing is that I get a PHP error that I don't really understand:

"Notice: Undefined variable: id in c:\program files\easyphp1-8\www\MySite\modules\mod_mainmenu.php on line 108"

Line 108
$txt = ''. $mitem->name .'';

This error only appears on MainLevels of the menu that are not active.
I mean if I click on Menu2_MainLevel_1 :

Menu1_Title                  Menu2_Title                      Menu3_Title
Menu1_Mainlevel_1          Menu2_Mainlevel_1            Menu3_Mainlevel_1       
                                    Menu2_Sublevel_1       
                                    Menu2_Sublevel_2
                                    Menu2_Sublevel_3

the error is going to appear on Menu1_Mainlevel_1 and Menu1_Mainlevel_3.
Any ideas ?

thanks


Top
 Profile  
 
 Post subject: Re: id=active_menu ***
PostPosted: Thu Sep 01, 2005 5:51 pm 
???


Top
  
 
 Post subject: Re: id=active_menu ***
PostPosted: Wed Sep 07, 2005 4:51 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Sep 01, 2005 6:23 am
Posts: 12
Hi all,

I still haven't find out why I'm having this PHP error:
"Notice: Undefined variable: id in c:\program files\easyphp1-8\www\MySite\modules\mod_mainmenu.php on line 108"

is that because I have more than one vertical menu ?

Any help would be appreciated.

thanks


Top
 Profile  
 
 Post subject: Re: id=active_menu ***
PostPosted: Wed Sep 07, 2005 4:52 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Aug 21, 2005 9:57 pm
Posts: 23
Location: Montréal
Yeah I still have the same bug too...

Please help


Top
 Profile  
 
 Post subject: Re: id=active_menu ***
PostPosted: Wed Sep 07, 2005 5:25 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Sep 01, 2005 6:23 am
Posts: 12
ok...

I found a solution.

just add the folowling line of code:

$id = '';

before the line:
if ( !$current_itemid ) {

looks like a crappy/ workaround solution but it works.


Top
 Profile  
 
 Post subject: Re: id=active_menu ***
PostPosted: Fri Oct 01, 2010 10:04 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Oct 01, 2010 9:51 am
Posts: 2
Location: London
Hi guys I think I have got the same issue with id="active_menu"

I have got the following category code where I believe this id is causing my webpage to appear ACCESS FORBIDDEN (flooding)

the code is follows:

<a title="Baby t-shirts" style="display:block;" class="mainlevel" href="/Baby-tops/View-all-products.html" >Baby t-shirts (56) </a>
<a title="Baby rompers" style="display:block;font-style:normal;" class="mainlevel" href="/Baby-rompers/View-all-products.html" id="active_menu">Baby rompers (53) </a>

<a title="Baby girls dresses" style="display:block;" class="mainlevel" href="/Baby-dresses/View-all-products.html" >Baby girls dresses (18) </a>
<a title="Baby hoodies" style="display:block;" class="mainlevel" href="/Baby-hoodies/View-all-products.html" >Baby hoodies (9) </a>
<a title="Kids stripy tops" style="display:block;" class="mainlevel" href="/Kids-stripy-tops.html" >Kids stripy tops (3) </a>
<a title="Kids Pyjamas" style="display:block;" class="mainlevel" href="/Kids-Pyjamas.html" >Kids Pyjamas (0) </a>
<a title="Baby trousers leggings" style="display:block;" class="mainlevel" href="/Baby-trousers/View-all-products.html" >Baby trousers leggings (4) </a>
<a title="Baby shoes" style="display:block;" class="mainlevel" href="/Baby-shoes/View-all-products.html" >Baby shoes (6) </a>

<a title="Baby hats" style="display:block;" class="mainlevel" href="/Baby-hats/View-all-products.html" >Baby hats (0) </a>
<a title="Socks and tights" style="display:block;" class="mainlevel" href="/Socks-and-tights/View-all-products.html" >Socks and tights (1) </a>
<a title="Baby gift sets" style="display:block;" class="mainlevel" href="/Baby-gift-sets/View-all-products.html" >Baby gift sets (0) </a>
<a title="Girls up to 10 yrs" style="display:block;" class="mainlevel" href="/Girls-up-to-8-yrs/View-all-products.html" >Girls up to 10 yrs (0) </a>
<a title="Boys up to 10 yrs" style="display:block;" class="mainlevel" href="/Boys-up-to-8-yrs/View-all-products.html" >Boys up to 10 yrs (0) </a>
<a title="Infant boy clothing" style="display:block;" class="mainlevel" href="/Infant-boy-clothing/View-all-products.html" >Infant boy clothing (3) </a>

Please visit my website at http://www.infanttoddlerclothing.com and click BABY ROMPERS in the category menu, this is the only menu that has access forbidden.

Also it is the only url in the category what contains different characters.

I know it could be server based error but I have tried everything nothing helps. I have got virtuemart installed on yoomla.

Please help me or at least point me to the right direction

Thanks

_________________
http://www.infanttoddlerclothing.com Baby clothing
Signature rules - Literal URLs Only. Domain can only be listed once.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 



Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group