How can I include the help file of a custom wiget in Portal?

262
3
03-11-2021 05:18 AM
Esther_Pastor_Motrel
Esri Contributor

I know the way to add help file of a custom widget in wab developers:

https://developers.arcgis.com/web-appbuilder/guide/add-help-for-your-widget.htm

But in Portal the 'docs' folder doesn't exist.

I would like to know if it can be made and if it's possible I would need to know the workflow.

Best regards.

0 Kudos
3 Replies
JayantaPoddar
MVP Esteemed Contributor

I believe the "~/docs" folder referred here is under ArcGISWebAppBuilder directory (Unzipped from the WAB-Dev Edition zip file).

Jayanta_Poddar_0-1615470868975.png

 



Think Location
0 Kudos
Esther_Pastor_Motrel
Esri Contributor

thank you @JayantaPoddar but it's for developer edition as I commented.

My doubt is the same procedure for portal version, because docs folder doesn't exist.

 

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Ester,

   The way that I handle this in my custom widget is to have a help folder under the widgets main folder and apply this hack to the setting.js of the widget.

 setConfig:function(config){
      //hack the 'Learn more about this widget link'
      setTimeout(function(){
        var helpLink = dojo.query('.help-link');
        helpLink[0].href = this.configWindow.esri._appBaseUrl + 'widgets/eSearch/help/eSearch_Help.htm';
        html.setStyle(helpLink[0],'display','block');
      },600);

      this.config = config;
...
0 Kudos