AnsweredAssumed Answered

WAB: How to add onclick button trigger to theme header subtitle?

Question asked by ftonini_msugis on Sep 14, 2017
Latest reply on Sep 14, 2017 by rscheitlin

I am customizing the header of the foldableTheme in WAB Dev Edition, and would like to make either the "subtitle" element or one of the "links" elements a button attached to an "onclick" event trigger to open a different URL (as an example). It seems like to customize the subtitle to a button I need to modify the main config.json in my web app:

 

config.json:

 

...

"appId": "",
"authorizedCrossOriginDomains": [""],
"title": "<div class=\"attribute-custom-style\"></div>",
"subtitle": "<button class=\"jimu-button-tutorial\" onclick=\"window.open(\"<my_url_here>\")\"><b><font size=\"2\" style=\"\">Start Tutorial</font></b></button>",
"keepAppState": true,

...

 

The subtitle parameters is passed as a text string to the index.html and jimu styler, I am guessing. Then I can style my button creating a class called "jimu-button-tutorial" inside ~jimu.js/css/jimu.css. However, the button does not click nor triggers any window opening with my URL. Any idea on what am I doing wrong? 

Outcomes