Make my custom splash screen widget work without a button?

513
2
Jump to solution
04-15-2019 07:18 AM
TimDine
Occasional Contributor II

I've made a copy of the splash widget to give it some custom behavior without having to give up the splash widget.  The plan is to take my custom widget working in the developer edition and deploy it to portal to use as an option in future sites.

The new functionality works, but I can't get the configuration to work quite correctly.  I want to have the widget available in the same spot on the add widget page as the splash screen instead of in the list of widgets that can be added as buttons to be activated.  

I don't believe I added anything to the splash widget to make it have a button, I'm assuming I've missed adding something to get it in that list.  I've found some information about manifest.js, what I've tried there hasn't worked.  Is there a piece of documentation that suggests how this is supposed to work?  Should I have started from scratch instead of thinking the splash widget would have been a good sample to start with?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Tim,

   So did you rename the widget in the manifest.json and the widgets folder? If you want an off panel widget to appear in the same location as the original splash widget then you have to manually edit the [install dir]\client\stemapp\predefined-apps\default\config.json. Search that file for "splash" and duplicate that object entery in the array replacing the uri for your new splash widgets uri.  Then when you create a new default app your splash widget will be listed there.

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Tim,

   So did you rename the widget in the manifest.json and the widgets folder? If you want an off panel widget to appear in the same location as the original splash widget then you have to manually edit the [install dir]\client\stemapp\predefined-apps\default\config.json. Search that file for "splash" and duplicate that object entery in the array replacing the uri for your new splash widgets uri.  Then when you create a new default app your splash widget will be listed there.

TimDine
Occasional Contributor II

The predefined-apps\default\config.json is what I was missing.  Added the new entry  and it appeared where I wanted it!

Thanks!

{
"uri": "widgets/Splash/Widget",
"visible": false,
"position": {
"relativeTo": "browser"
},
"version": "2.11"
}, {
"uri": "widgets/SplashWhatsNew/Widget",
"visible": false,
"position": {
"relativeTo": "browser"
},
"version": "2.11"
},

0 Kudos