<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom HTML/CSS header - Hide a menu link which links to an app that it is shared with a group only in ArcGIS Hub Questions</title>
    <link>https://community.esri.com/t5/arcgis-hub-questions/custom-html-css-header-hide-a-menu-link-which/m-p/1580385#M6526</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/232343"&gt;@PanGIS&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;You are correct. Due to security concerns, Hub does not permit external javascript to be embedded and within my knowledge, limiting who can see links is only built into our out-of-the-box headers. I don't know of a way for you to do with with the custom header.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2025 15:00:17 GMT</pubDate>
    <dc:creator>KlaraSchmitt</dc:creator>
    <dc:date>2025-01-30T15:00:17Z</dc:date>
    <item>
      <title>Custom HTML/CSS header - Hide a menu link which links to an app that it is shared with a group only</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/custom-html-css-header-hide-a-menu-link-which/m-p/1580346#M6525</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I have a Custom HTML/CSS header configured for Hub.&lt;/P&gt;&lt;P&gt;I need to add a menu link that links to an app shared with a&amp;nbsp; group and visible only if the user is signed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the Standard Header I managed to make this work and it is pretty easy, but fort he Custom one seems to be more complicated, hopefully not impossible.&lt;/P&gt;&lt;P&gt;First of all: &lt;STRONG&gt;is it even possible to the best of your knowledge?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As, per my attempt, I interrogated ChatGPT and it suggests to modify the HTML with this class&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;SPAN class=""&gt;li&lt;/SPAN&gt; &lt;SPAN class=""&gt;class&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"private-link"&lt;/SPAN&gt; &lt;SPAN class=""&gt;style&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"display: none;"&lt;/SPAN&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;modify the CSS with this:&lt;BR /&gt;&lt;SPAN class=""&gt;.private-link&lt;/SPAN&gt; { &lt;SPAN class=""&gt;display&lt;/SPAN&gt;: none;&lt;BR /&gt;&lt;BR /&gt;add this JavaScript caller to the HTML, but when I do so, the javascript disappears from the text an in fact also the menu link disappears because it take the display:none class.&lt;/P&gt;&lt;P&gt;Actually to the best of my knowledge, JavaScript is not supported at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;script&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;SPAN class=""&gt;async&lt;/SPAN&gt; &lt;SPAN class=""&gt;function&lt;/SPAN&gt; &lt;SPAN class=""&gt;checkUserAuth&lt;/SPAN&gt;() { &lt;SPAN class=""&gt;const&lt;/SPAN&gt; portalUrl = &lt;SPAN class=""&gt;"&lt;A href="https://geogovmt.maps.arcgis.com/sharing/rest/community/self" target="_blank" rel="noopener"&gt;https://geogovmt.maps.arcgis.com/sharing/rest/community/self&lt;/A&gt;"&lt;/SPAN&gt;; &lt;SPAN class=""&gt;try&lt;/SPAN&gt; { &lt;SPAN class=""&gt;const&lt;/SPAN&gt; response = &lt;SPAN class=""&gt;await&lt;/SPAN&gt; &lt;SPAN class=""&gt;fetch&lt;/SPAN&gt;(portalUrl, { &lt;SPAN class=""&gt;credentials&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"include"&lt;/SPAN&gt; }); &lt;SPAN class=""&gt;const&lt;/SPAN&gt; user = &lt;SPAN class=""&gt;await&lt;/SPAN&gt; response.&lt;SPAN class=""&gt;json&lt;/SPAN&gt;(); &lt;SPAN class=""&gt;if&lt;/SPAN&gt; (user.&lt;SPAN class=""&gt;username&lt;/SPAN&gt;) { &lt;SPAN class=""&gt;// User is signed in, show the private menu link&lt;/SPAN&gt; &lt;SPAN class=""&gt;document&lt;/SPAN&gt;.&lt;SPAN class=""&gt;querySelectorAll&lt;/SPAN&gt;(&lt;SPAN class=""&gt;".private-link"&lt;/SPAN&gt;).&lt;SPAN class=""&gt;forEach&lt;/SPAN&gt;(&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;link&lt;/SPAN&gt; =&amp;gt;&lt;/SPAN&gt; { link.&lt;SPAN class=""&gt;style&lt;/SPAN&gt;.&lt;SPAN class=""&gt;display&lt;/SPAN&gt; = &lt;SPAN class=""&gt;"block"&lt;/SPAN&gt;; }); } } &lt;SPAN class=""&gt;catch&lt;/SPAN&gt; (error) { &lt;SPAN class=""&gt;console&lt;/SPAN&gt;.&lt;SPAN class=""&gt;error&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"Error checking authentication:"&lt;/SPAN&gt;, error); } } &lt;SPAN class=""&gt;// Run the function when the page loads&lt;/SPAN&gt; &lt;SPAN class=""&gt;document&lt;/SPAN&gt;.&lt;SPAN class=""&gt;addEventListener&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"DOMContentLoaded"&lt;/SPAN&gt;, checkUserAuth); &lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;script&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 12:56:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/custom-html-css-header-hide-a-menu-link-which/m-p/1580346#M6525</guid>
      <dc:creator>PanGIS</dc:creator>
      <dc:date>2025-01-30T12:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Custom HTML/CSS header - Hide a menu link which links to an app that it is shared with a group only</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/custom-html-css-header-hide-a-menu-link-which/m-p/1580385#M6526</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/232343"&gt;@PanGIS&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;You are correct. Due to security concerns, Hub does not permit external javascript to be embedded and within my knowledge, limiting who can see links is only built into our out-of-the-box headers. I don't know of a way for you to do with with the custom header.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 15:00:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/custom-html-css-header-hide-a-menu-link-which/m-p/1580385#M6526</guid>
      <dc:creator>KlaraSchmitt</dc:creator>
      <dc:date>2025-01-30T15:00:17Z</dc:date>
    </item>
  </channel>
</rss>

