Getting rid of the 'edit' button when self-hosting a story map

1542
13
Jump to solution
04-01-2021 01:54 AM
HelenCooper
Occasional Contributor III

Hi all, 

I'm self-hosting a story map (classic template) for the first time. 

It's been great to be able to edit the styles, etc. however, I'm stuck on one thing: I'd like to get the 'edit' button that appears on the top right of the story map to disappear, like it does when they're hosted via AGOL and you're not logged in.  Is there any way I can do this? (screen shot below, and the URL to my story map is here: https://www.mapitout.co.uk/CDS/index.html?appid=0e5b0f8a85d1459395993cbcce7d0e20# )

 

HelenCooper_0-1617267046603.png

 

Thanks in advance for any help or suggestions for this. 

Helen

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RickeyFight
MVP Regular Contributor

@HelenCooper 

Another Idea. Where did you download this story map at? 

 

https://community.esri.com/t5/classic-esri-story-maps/application-id-in-the-index-html-file-is-ignor...

Look at @OwenGeo answer. maybe you downloaded it wrong 

 

View solution in original post

13 Replies
bsneller_esrinederland
New Contributor II
0 Kudos
HelenCooper
Occasional Contributor III

Thanks, but then it doesn't include the style changes I've made (e.g. to the header and the colour of the tabs). 

0 Kudos
RickeyFight
MVP Regular Contributor

@HelenCooper 

one option is to go to your index

RickeyFight_0-1617286750379.png

and add   

style="display: none;"

 for some reason it getting the 

style="display: inline-block;"

 which keeps the edit option in the webapp 

HelenCooper
Occasional Contributor III

Thanks @RickeyFight .  Where would I add that?  I've tried replacing the style tag here (see snippet and screen shot below), but that didn't seem to work?  

 

<body class="claro">
<style="display: none;">

/* CUSTOM CSS RULES */
</style>

<!-- Builder top panel is injected here -->
<div id="builderPanel" class="hide mainViewAboveMap"></div>

HelenCooper_0-1617290131963.png

 

0 Kudos
RickeyFight
MVP Regular Contributor

@HelenCooper  In your index.html 

I think line 110. Look for a button that class has switchBuilder in it

HelenCooper
Occasional Contributor III

Thanks for helping so much with this @RickeyFight .  I've updated the code to:


<button type="button" class="switchBuilder btn btn-xs btn-primary" style="display: none;" tabindex="-1"></button>

but that doesn't seem to work.  When I load the page I now see a /* CUSTOM CSS RULES */ text at the top. 

Sorry if I'm missing something obvious, does the style code go elsewhere around the button? 

HelenCooper_0-1617291672337.png

0 Kudos
RickeyFight
MVP Regular Contributor

@HelenCooper 

Did you go back and change this part back

<body class="claro">
<style="display: none;">

/* CUSTOM CSS RULES */
</style>

<!-- Builder top panel is injected here -->
<div id="builderPanel" class="hide mainViewAboveMap"></div>

HelenCooper
Occasional Contributor III

@RickeyFight  Nope (facepalm), I've done that now, and it's sorted the CUSTOM CSS RULES text that I was seeing, but I'm also still seeing the edit button.

Have I got this line correct?

<button type="button" class="switchBuilder btn btn-xs btn-primary" style="display: none;" tabindex="-1"></button>

0 Kudos
RickeyFight
MVP Regular Contributor

@HelenCooper 

I thought that would work. Try: 

<button type="button" class="switchBuilder btn btn-xs btn-primary" style="display: none !important;" tabindex="-1">