Select to view content in your preferred language

A widget container

3207
4
Jump to solution
05-21-2016 12:28 PM
Haider_Ali
Frequent Contributor

i want to create a menu widget controller  that will group the widgets in the form of menu as shown here Dojo WIdgetContainer - JSFiddle  i.e.  group will be  a popupMenuItem and submenu will be widgets

I also need the header widget controller as i want some widget to go into header controller and some into menu controller how can i differentiate between these to in config introducing an type(header or menu) in widget pool is fine?

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi,

In this case, you might want to try to introduce a new object, let's say, "menuWidgetPool" in your layout config.json file, which is similar to "widgetPool" that contains an array of defined widgets.

And in your custom controller widget, for example, the menu controller widget, read the layout config, and grab the custom "menuWidgetPool" object and generate the UI of the controller.

I linked a demo theme SidebarTheme.zip I created for a tutorial, and it has the menu/sidebar controller, which reads from "widgetPool" to populate the UI. You can modify it to make it read from "menuWidgetPool" object instead.

Hope this helps a little,

Yiwei

View solution in original post

4 Replies
by Anonymous User
Not applicable

Hi,

In this case, you might want to try to introduce a new object, let's say, "menuWidgetPool" in your layout config.json file, which is similar to "widgetPool" that contains an array of defined widgets.

And in your custom controller widget, for example, the menu controller widget, read the layout config, and grab the custom "menuWidgetPool" object and generate the UI of the controller.

I linked a demo theme SidebarTheme.zip I created for a tutorial, and it has the menu/sidebar controller, which reads from "widgetPool" to populate the UI. You can modify it to make it read from "menuWidgetPool" object instead.

Hope this helps a little,

Yiwei

Haider_Ali
Frequent Contributor

Here is what i have created (controller widget)

CustomTheme.zip

and its config (grpConfig.txt )

please have a look into it (also suggest how can i move the sidebar with right panel so that the controller widget is always visible)

0 Kudos
PriyankaDas1
Deactivated User

I am a newbie in web app builder.I would like to know where should config(grpConfig.txt) be added in CustomTheme folder.

0 Kudos
Haider_Ali
Frequent Contributor

It is just a sample its content to be added in  config.json (application one)

0 Kudos