Page 1 of 1

After the log out, when I log in the menu continues showing the last menu item selected

Posted: 28 Jun 2017, 14:40
by crismgarcia
After the log out, when I log in the menu continues showing the last menu item selected

Re: After the log out, when I log in the menu continues showing the last menu item selected

Posted: 29 Jun 2017, 08:01
by aragorn
We add the id of selected items to cookie. Therefore, I think you can use PF('menuWidgetVar').clearMenuState() after clicking "Logout" button. Exp;
in template.xhtml

Code: Select all

function clearCookie() {
   var $this = PF('IcarusMenu');
   if($this) {
      $this..clearMenuState();
   }
}
<pi:menu widgetVar="IcarusMenu"> ..

Re: After the log out, when I log in the menu continues showing the last menu item selected

Posted: 29 Jun 2017, 14:38
by crismgarcia
Thanks!!!

Re: After the log out, when I log in the menu continues showing the last menu item selected

Posted: 29 Jun 2017, 14:59
by aragorn
You're welcome!