Any one know of a way to get a custom popup in a map to go to a specific section in a Story Map Journal and not open in a new window/tab?
Can get the link to work fine but no matter what I do it always opens in a new tab - even if I edit the HTML in the custom attributes and change the target from the default "_blank", when I run the app it seems to ignore this and reverts back to "_blank". Very frustrating...
Cheers
Solved! Go to Solution.
I think it's the Javascript API is forcing the link to open in a new window, I don't think there is a workaround for that (have you tried target="_self"?).
If you find a way to do it, note that it won't be optimal as the full app will need to reload. On GitHub we describe a technique that require hosting of the application that will allow you to do that. By default it require the features for which you want to create such an action to be in a single layer and don't support advanced popup like you have but hope this will help you GitHub - Esri/map-journal-storytelling-template-js: The Story Map Journal is ideal when you want to ...
Is there a way for you to post a link to your story map here so that we can look at it and see its behavior?
I've enabled public access for now...still in development.
Have a look at http://arcg.is/20Bzn0R
If you navigate to the 6th section called "Settlement - Ayr". Top right of the map is a area labelled "Heathfield Strategy Area". Click on it and look for the entry that prompts to see strategy map. Click the link and it will open in a new tab despite the attribute being "See <a href="http://arcg.is/1Q1amKV" target="_parent">Heathfield Strategy map</a> for details for this area".
If you inspect the element it's been changed to target=_blank
Don't want the overhead of opening story map multiple times as I've more of these areas to add to the map.
Clicked on this popup which says "Heathfield Strategy Map" and clicked on "Inspect Element".
It says target="_blank". I removed that section and clicked the link in the popup and i am able to load the map in the same window and not in a new tab.
I suspect there's some main.css somewhere that's forcing the "_blank" property on the <a> tag.
I think it's the Javascript API is forcing the link to open in a new window, I don't think there is a workaround for that (have you tried target="_self"?).
If you find a way to do it, note that it won't be optimal as the full app will need to reload. On GitHub we describe a technique that require hosting of the application that will allow you to do that. By default it require the features for which you want to create such an action to be in a single layer and don't support advanced popup like you have but hope this will help you GitHub - Esri/map-journal-storytelling-template-js: The Story Map Journal is ideal when you want to ...
Thanks for this. Tried "_self" and every other option I could think of but seems the API always forces "_blank". Who knew eh? Will try and work out a different journey for the user that avoids linking from the map or opening the app multiple times.