Hello,
I'm running WAB 2.2 with the Jewelry Box Theme. I have an edit widget and three custom widgets that appear in the WAB widget tab. I need to be able to add more widgets than the three custom widgets I already have. I can add a widget to the header control. However, I do not want the widget on the header control. My intention is to activate the widget via a Feature Action by selecting a feature on the map. How can I add more widgets?
Greg
Solved! Go to Solution.
Greg,
If you are talking about adding additional on screen widgets to the theme then all you have to do is add them to the main config.json:
"widgetOnScreen": {
"widgets": [
{
"uri": "themes/JewelryBoxTheme/widgets/HeaderController/Widget",
"position": {
"left": 0,
"top": 0,
"right": 0,
"height": 40,
"relativeTo": "browser"
},
"version": "2.4",
"id": "themes_JewelryBoxTheme_widgets_HeaderController_Widget_19",
"icon": "themes/JewelryBoxTheme/widgets/HeaderController/images/icon.png?wab_dv=2.1",
"name": "HeaderController"
},
........
{
"position": {
"left": 55,
"top": 45,
"relativeTo": "map",
"width": 200
},
"placeholderIndex": 1,
"id": "_23",
"uri": "",
"version": "2.4",
"closeable": true
},
{
"position": {
"left": 105,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 2,
"id": "_24",
"version": "2.4",
"closeable": true,
"uri": ""
},
{
"position": {
"left": 155,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 3,
"id": "_25"
},
{
"position": {
"left": 205,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 4,
"id": "_26"
},
{
"position": {
"left": 255,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 5,
"id": "_27"
},
{
"position": {
"left": 305,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 6,
"id": "_28"
},
.......
Greg,
If you are talking about adding additional on screen widgets to the theme then all you have to do is add them to the main config.json:
"widgetOnScreen": {
"widgets": [
{
"uri": "themes/JewelryBoxTheme/widgets/HeaderController/Widget",
"position": {
"left": 0,
"top": 0,
"right": 0,
"height": 40,
"relativeTo": "browser"
},
"version": "2.4",
"id": "themes_JewelryBoxTheme_widgets_HeaderController_Widget_19",
"icon": "themes/JewelryBoxTheme/widgets/HeaderController/images/icon.png?wab_dv=2.1",
"name": "HeaderController"
},
........
{
"position": {
"left": 55,
"top": 45,
"relativeTo": "map",
"width": 200
},
"placeholderIndex": 1,
"id": "_23",
"uri": "",
"version": "2.4",
"closeable": true
},
{
"position": {
"left": 105,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 2,
"id": "_24",
"version": "2.4",
"closeable": true,
"uri": ""
},
{
"position": {
"left": 155,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 3,
"id": "_25"
},
{
"position": {
"left": 205,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 4,
"id": "_26"
},
{
"position": {
"left": 255,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 5,
"id": "_27"
},
{
"position": {
"left": 305,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 6,
"id": "_28"
},
.......
Thank You Robert, that worked. I did have some duplicate id's, I'm not sure if that matters. It is working and I do see the additional widgets now.
Greg