How to force the highlight of a concrete pv:menu menuitem

Locked
beleta
Posts: 5
Joined: 13 Dec 2012, 21:42

13 Jun 2016, 20:27

I am using a pv:menu in the toolbar of my application.

How can I highlight the toolbar menuitem corresponding to a page, when this page has not been loaded as the result of clicking on that menuitem.

My problem is that I want to show a page after login but the highlight always is on the last clicked menuitem. Even the highlighted menuitem is remembered between server runs.

Thank you in advance.

Jose M Beleta

beleta
Posts: 5
Joined: 13 Dec 2012, 21:42

14 Jun 2016, 12:14

I forgot to say that this behavior shows up in your own demo. Enter Venture Live Preview select Documentation and close the tab. Then enter Live Preview again, the Documentation menuiten is still highlighted but your are looking at Dashboard not Documentation.

Best regards,

Jose M Beleta

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

16 Jun 2016, 14:47

Thanks! I'll check and get back to you.

beleta
Posts: 5
Joined: 13 Dec 2012, 21:42

22 Sep 2016, 13:30

Any new on this topic?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

26 Oct 2016, 16:28

Please add the following line into layout.js on new venture version;

Code: Select all

...
bindTopbarMenuEvents: function() {
       ...
        
        this.clickNS = 'click.' + this.id;
        $(document.body).off(this.clickNS).on(this.clickNS, function (e) {
            if(!$this.layoutMenuClick) {
                var activeMenuParent = $this.menu.children('li.active-menu-parent');
                if($this.isPopupMenu()) {
                    $this.menuWrapper.removeClass('active');
                    activeMenuParent.children('a').removeClass('active-menu');
                }
                activeMenuParent.removeClass('active-menu-parent').children('ul').removeClass('active-menu');
                $this.menuPopupButton.removeClass('active');
                $this.menubarActive = false;
                
               /************* ADDED THIS LINE **************/

                if(!$this.isPopupMenu()) { 
                    $this.clearMenuState();
                }

               /****************************************/
            }
            
            ....
        });
    },
I'll add this fix to next release.

Locked

Return to “Venture”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest