Is it possible to add more custom widget slots in the 'Launchpad theme' in WAB Dev?

841
8
Jump to solution
05-24-2018 09:50 AM
MatthewElbert1
Occasional Contributor

I am curious to see if it is possible to add multiple custom widget spots to the 'Launchpad theme' in WAB Dev.  Currently I am working with the layout and have maxed out the 3 custom widget slots that it allows for.  (But would like to have at least two more available).  Is this at all a possibility? Or am I stuck with the format given?

Thanks

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Matthew,

   No that is the wrong file. You need to work with the main config.json for your app.

[install dir]\server\apps\[app#]\config.json not the config.json that is inside the themes\...\layout folder. As to where in that file, you have to find the location of the other "placeholderIndex" properties. So if you have some widget in all three available on screen widget placeholders already it will look different. All the on screen widget placeholders will have "placeholderIndex" : 1. after the last one you add your new blank spots like i have in the other thread.

Adjusting the "right" or "left", "top" and "placeholderIndex" values as needed.

      {
        "position": {
          "right": 305,
          "top": 20,
          "relativeTo": "map"
        },
        "placeholderIndex": 6
      },
      {
        "position": {
          "right": 355,
          "top": 20,
          "relativeTo": "map"
        },
        "placeholderIndex": 7
      },

View solution in original post

8 Replies
RobertScheitlin__GISP
MVP Emeritus

Matthew,

  See this thread where I answer that question.

https://community.esri.com/thread/185188-on-screen-widgets 

MatthewElbert1
Occasional Contributor

So I found the layout config.js for the Launchpad theme, but I'm still wondering what syntax I enter, and where.  (Do I put it below that last ph_13 pictured below)?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Matthew,

   No that is the wrong file. You need to work with the main config.json for your app.

[install dir]\server\apps\[app#]\config.json not the config.json that is inside the themes\...\layout folder. As to where in that file, you have to find the location of the other "placeholderIndex" properties. So if you have some widget in all three available on screen widget placeholders already it will look different. All the on screen widget placeholders will have "placeholderIndex" : 1. after the last one you add your new blank spots like i have in the other thread.

Adjusting the "right" or "left", "top" and "placeholderIndex" values as needed.

      {
        "position": {
          "right": 305,
          "top": 20,
          "relativeTo": "map"
        },
        "placeholderIndex": 6
      },
      {
        "position": {
          "right": 355,
          "top": 20,
          "relativeTo": "map"
        },
        "placeholderIndex": 7
      },
MatthewElbert1
Occasional Contributor

Ah sounds good,

I think I understand now--the only issue I'm having is that the syntax indentation format is off, does this mean I need to open the 'config.json in Notepad++ or something?

Thanks

0 Kudos
MatthewElbert1
Occasional Contributor

Already downloaded Notepad++ and it alleviated my indentation issues!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.

0 Kudos
MatthewElbert1
Occasional Contributor

haha beat me to the punch on the 'answered comment'

Cheers

0 Kudos
MatthewElbert1
Occasional Contributor

Robert,

I got it squared away and inserted.  And it worked!  Pretty cool for a novice like myself to see the process work.  Now I just had to edit the 'left/right' distances to get it to line up.  But again, thank you--it took a little deciphering of the syntax and order, but I'm starting to get the hang of it a bit.  (I'll mark your last explanation as answered!)

Best

0 Kudos