Questions and Answers

How do I collect points?

  • +4
    Chosen as best answer
  • +1
    Posted answer
  • +1
    Posted question
  • +1
    Thumb up
  • -1
    Thumb down
3

by Iván Morales Vicente about September 7, 2011 open - report

Navigation Menu class="active" problem

I want to highlight the menu item where I'm navigating. SocialEngine adds class="active" property for active menu items. The problem is that in some cases the "active" class doesn't add. How I can get all the menu elements with the "active" class? Which file in SocialEngine generates class="active" in the navigation bar? Thanks!

Answers: 3  •  Score 0  •  Views: 2293

3 Answers
Browse by
  • 121

    by Louise Wilson about September 8, 2011

    A useful thing for css and coding to find bits is Firebug you can get this for most browsers, It will help you find the correct code or css that needs changing
  • 37

    by Anatolii about September 7, 2011

    If you create a custom navigation, you need to set property 'active' to 'true' for current page. Example: $navigation = $this->_navigation = new Zend_Navigation(); $navigation->addPage(array( 'label' => Zend_Registry::get('Zend_Translate')->_('Label'), 'route' => 'default', 'module' => 'some_module', 'controller' => 'some_controller', 'action' => 'some_action', 'active' => true ));
    1 comment
    • Iván Morales Vicente
      by Iván Morales Vicente
      September 7, 2011

      Ops, how I can do this? I'm sorry I don't have experience with php.

  • 400

    by Nick about September 7, 2011

    I think there was something similar in this question http://socialenginecamp.com/question/view/10/1/fix-for-buttons-on-edit-my-profile Maybe it will be useful for you
    • Score: 0
    1 comment
    • Iván Morales Vicente
      by Iván Morales Vicente
      September 7, 2011

      Mmm I don't know how to fix main navigation. For example in blogs module, if I have "Browse All Blogs" selected (the default page), adds the active class. But if I select "My Blogs", the class disappears. :S
      I would be a clue :)

You must login to post an answer.