Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8619451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:20:34+00:00 2026-06-12T06:20:34+00:00

‘items’=>array( array( ‘label’=>’About’, ‘url’=>array(‘about/index’) ), about/index – we get the class on the menu

  • 0
'items'=>array(
     array(
         'label'=>'About',
         'url'=>array('about/index')
),

about/index – we get the class on the menu – active.

about/graphic – we don’t get the class on the menu active.

about/print – we don’t get the class on the menu active.

Please note that the menu has NO subitems.
Only About.

No mater if the user is on graphic, print or whatever, we wish to have the About highlighted.

How can we accomplish this ?

I’ve tried to edit that ‘url’ param a lot. No luck.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:20:36+00:00Added an answer on June 12, 2026 at 6:20 am
    'items'=>array(
         array(
             'label'=>'About',
             'url'=>array('about/index'),
             'active'=>Yii::app()->controller->id=='about',
    ),
    

    Added the active param. This worked.

    active: boolean, optional, whether this menu item is in active state
    (currently selected). If a menu item is active and activeClass is not
    empty, its CSS class will be appended with activeClass. If this option
    is not set, the menu item will be set active automatically when the
    current request is triggered by url.
    Note that the GET parameters
    not specified in the ‘url’ option will be ignored.

    I’ve set that property. Otherwise it wouldn’t work.

    However, as you can see on the bold line, they say this should be automatically triggered. It wasn’t on this case.

    I suppose this was the case due to the fact that Yii is expecting a child element of About in order to apply that class, since there’s any, we have to force it, to get the parent instead.

    Not sure however.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't have much knowledge about the IPv6 protocol, so sorry if the question
This is how I get the tags of a body of text. var tags
I am doing a simple coin flipping experiment for class that involves flipping a
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I was writing code for dragging mechanism which invokes to wait for small period
I've got a string that has curly quotes in it. I'd like to replace
I downloaded PostgreSQL from the official website and ran the .dmg installer. After that
I'm running a Octopress blog which is based on Jekyll . Now I wanted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.