How do I create a website link?

3298
4
Jump to solution
04-14-2015 10:00 AM
ThaoLe1
New Contributor III

When I click on the created ESRI link, it will open another webpage.  How can I configure it so that it opens in the same webpage?

Link_self.png

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Thao,

  There is no json configuration for the target setup in the source code. If you want to do something like that then you will have to modify the source code for the HeaderController/widget.js.

Find the file here "themes\FoldableTheme\widgets\HeaderController\Widget.js" and then find the _createDynamicLinks function there @ line 376 you will find the target hard coded to '_blank'

View solution in original post

4 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Thao,

  There is no json configuration for the target setup in the source code. If you want to do something like that then you will have to modify the source code for the HeaderController/widget.js.

Find the file here "themes\FoldableTheme\widgets\HeaderController\Widget.js" and then find the _createDynamicLinks function there @ line 376 you will find the target hard coded to '_blank'

ThaoLe1
New Contributor III

Thanks Robert, it works perfectly.

0 Kudos
StanMcShinsky
Regular Contributor

Thao,

You could change the line like Robert said:

Find the file here "themes\FoldableTheme\widgets\HeaderController\Widget.js" and then find the _createDynamicLinks function there @ line 376 you will find the target hard coded to '_blank'

but change it to

target: link.target,

Then go into your config at the root of your application and add the comma and a target option.

"links": [
    {
      "label": "test",
      "url": "http://www.esri.com",
      "target": "_self"
    }
  ],

This allows you to now change it in the config file.

-Stan

ThaoLe1
New Contributor III

Stan, I tried your suggestion and it worked as well. Thanks.

0 Kudos