add more widgets to foldable

3172
6
Jump to solution
08-27-2015 12:00 PM
jordanparfitt1
New Contributor III

Is it possible to add more than five "non screen" widgets to the foldable theme?

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Jordan,

   Sure you would just have to manually add then to the config.json in the widgetOnScreen widgets array and adjust the position and make sure the id is unique.

{

        "position": {

          "left": 55,

          "top": 45,

          "relativeTo": "map"

        },

        "placeholderIndex": 1,

        "id": "_38",

        "name": "Share",

        "label": "Share",

        "version": "1.1.2",

        "uri": "widgets/Share/Widget",

        "config": "configs/Share/config_Share.json"

      }

View solution in original post

6 Replies
RobertScheitlin__GISP
MVP Emeritus

Jordan,

   Sure you would just have to manually add then to the config.json in the widgetOnScreen widgets array and adjust the position and make sure the id is unique.

{

        "position": {

          "left": 55,

          "top": 45,

          "relativeTo": "map"

        },

        "placeholderIndex": 1,

        "id": "_38",

        "name": "Share",

        "label": "Share",

        "version": "1.1.2",

        "uri": "widgets/Share/Widget",

        "config": "configs/Share/config_Share.json"

      }

jordanparfitt1
New Contributor III

Thanks!

I'm starting to get more comfortable with this. It's definitely easier to mess with outside of the web app builder.

0 Kudos
TobiasFimpel
Occasional Contributor

Hi Robert,

When I add an extra widget that way it I am running into a layout issue: if the height/width ratio of the browser is approximately that of a mobile device the additional widget floats to the lower right corner. You can try this example webapp. 

I searched through the code and have trouble finding the cause of this behavior. Do you know why it behaves that way? Do you have suggestions which js/css files to look into?

Many thanks, Tobias

0 Kudos
TobiasFimpel
Occasional Contributor

Answering my own question in case somebody else is looking for it. Per Esri documentation, add this to the mobileLayout property (in file config.json):

{
"position": {
"left": 285,
"top": 45
}
},

0 Kudos
James_001
Occasional Contributor II

Hi Robert,

 I have launchpad theme per your suggestion in this post and the other, I tried to add the new widget in my widget on screen, I have 4 and want to add more. This is the location of my file. App loaded every time but Share (new widget) don't appear. I am not sure what I am doing wrong here. Please help me, I will really appreciate. 

WebAppBuilderForArcGIS\server\apps\10\config.json

widgetOnScreen

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ifran,

   Those position values look like you would be placing it at the same position as one of the existing on screen widget and there is one under the other.

0 Kudos