Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
$menu->setActive() not setting all menus
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dayo  
View profile  
 More options Aug 20 2012, 3:06 pm
From: Dayo <daka...@gmail.com>
Date: Mon, 20 Aug 2012 12:06:07 -0700 (PDT)
Local: Mon, Aug 20 2012 3:06 pm
Subject: $menu->setActive() not setting all menus

Hi all,

I managed to muddle my way, with some help, to a solution for this
question: http://stackoverflow.com/questions/12018741/where-is-itemid-used-to-f...

That is, by adding "$menu->setActive(XYZ)" to my component controller.php,
I am able to get the Main Menu in the side bar to correctly be highlighted.

My issue is that when I try a theme from RocketTheme, I notice the are some
other menus linked to main menu but that these are not highlighted.

I would have thought using the setActive would affect all menus but it
seems not.

Can anyone kindly help nudge me in the right direction?

Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
elin  
View profile  
 More options Aug 20 2012, 7:29 pm
From: elin <elin.war...@gmail.com>
Date: Mon, 20 Aug 2012 16:29:25 -0700 (PDT)
Local: Mon, Aug 20 2012 7:29 pm
Subject: Re: $menu->setActive() not setting all menus

I believe that you are only allowed to have one active link on any rendered
page according to W3C standards. Sometimes people use a work around to use
another setting besides active and style it to appear active.

Elin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dayo  
View profile  
 More options Aug 21 2012, 12:22 pm
From: Dayo <daka...@gmail.com>
Date: Tue, 21 Aug 2012 09:22:02 -0700 (PDT)
Local: Tues, Aug 21 2012 12:22 pm
Subject: Re: $menu->setActive() not setting all menus

Thanks for that.

I am actually trying to make sure I have the same highlighted active link.

What is happening now is that some menus show the item I passed
using "$menu->setActive(XYZ)" and other show the default "Home".

I want them to all show the same XYZ item.

Thanks again.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan YJ  
View profile   Translate to Translated (View Original)
 More options Aug 21 2012, 9:17 pm
From: Dan YJ <nocniage...@gmail.com>
Date: Tue, 21 Aug 2012 18:17:52 -0700 (PDT)
Local: Tues, Aug 21 2012 9:17 pm
Subject: Re: $menu->setActive() not setting all menus

get it by current itemid
$menu = $app->getMenu();
if ($menu->getActive() == JRequest::getCmd('Itemid') == 155 ) {
        $active_link =' iam_active';


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan YJ  
View profile  
 More options Aug 22 2012, 9:25 am
From: Dan YJ <nocniage...@gmail.com>
Date: Wed, 22 Aug 2012 06:25:00 -0700 (PDT)
Subject: Re: $menu->setActive() not setting all menus

if ($menu->getActive() == $menu->getDefault()) {  //  
$menu->getDefault( )  this is homepage
build condition for homepage link only with snippet above


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic