Can I add widget functionality to header menu?

JETLIFE
Kilo Contributor

Hello!

I've struggled with some advanced portal configuration and I can't find anything on google to answer these questions:

I want to add a "menu item" to my header. However, I'd like this to not be a link to a specific site. Instead I'd like it to change the outlook on the Main Page. Default there are 4 widgets visible. When one presses the button, 4 more widgets appear, and press it again, and those 4 extra disappear. Basically a toggle-function for available widgets. Is this possible?

EDIT: To clarify, I want it to be located in the header, not as a button in a widget.

Thanks for replies,

 

Regards,

 

Simon

 

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

You're going to need to do this via Service Portal events using broadcast and on handlers. Sush wrote a good article on how you can communicate between widgets.

I've used this before and it's pretty cool.

View solution in original post

2 REPLIES 2

Chuck Tomasi
Tera Patron

You're going to need to do this via Service Portal events using broadcast and on handlers. Sush wrote a good article on how you can communicate between widgets.

I've used this before and it's pretty cool.

Hi,

I think it can done with simple css "display" property to show/hide widgets instead of using Angular $broadcast and $on handlers.

following are the high level steps to achieve the requirement using JQuery and CSS

  1. Header needs to be cloned and a custom menu item needs to be added besides the OOTB Menu items.
  2. onclick listener should be attached from HTML <script> element (cleanest way) to the custom menu item which contains the functionality for changing CSS property of the container containing the 4 widgets or widgets from random places.
  3. Note : class names should be given to the Column or container containing your widgets.

Sampath.