Select to view content in your preferred language

Stay in Iframe in Enterprise Sites

656
3
Jump to solution
09-20-2022 12:54 AM
Labels (1)
LarsElmkær_Chwastek
Occasional Contributor

Hi all,

I have created an Enterprise Site with corresponding pages. In one page I want to add the standard Portal page, when you as a user is logged in and can see you content, groups etc. 

I've done this by adding an iframe with the URL to our Portal, and everything works fine, when I'm just browsing around in my own folders and content.

However when I click either, Home, Gallery, Map, Scene, Groups, Content or Organization in the top bar, it leaves my iframe, and site altogether and opens the link itself.

How do I prevent it from leaving my iframe and staying within in my site/page?

Thanks 🙂 

0 Kudos
1 Solution

Accepted Solutions
TomGeo
by
Occasional Contributor III

@LarsElmkær_Chwastek, I believe there is no way for the document containing the Iframe to change that behaviour. It seems those links are overriding the default behaviour, to open in the same iframe, and security restrictions prevent interactions with the DOM of other origins. Those links are so to say from another origin. 

That is, except if you can change the target of those links to something like target=‘_self’ in their a tag. 

- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!

View solution in original post

0 Kudos
3 Replies
TomGeo
by
Occasional Contributor III

@LarsElmkær_Chwastek, I believe there is no way for the document containing the Iframe to change that behaviour. It seems those links are overriding the default behaviour, to open in the same iframe, and security restrictions prevent interactions with the DOM of other origins. Those links are so to say from another origin. 

That is, except if you can change the target of those links to something like target=‘_self’ in their a tag. 

- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!
0 Kudos
LarsElmkær_Chwastek
Occasional Contributor

Hi TomGeo,

Thank you for your answer - even though it's not what I wanted to hear 🙂

I'm not sure there is any way, that I can alter the target of ArcGIS.com links - I don't think Esri have made it possible to do this type of modification in Hub/Sites.. 

0 Kudos
TomGeo
by
Occasional Contributor III

Sorry to disappoint 😉

Hilsen, Tom

- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!
0 Kudos