You are viewing limited content. For full access, please sign in.

Question

Question

weblink 11 remove More link

asked on February 6, 2023 Show version history

Hi Folks, Does anyone have a quick solution to remove the More link from the top of Weblink 11? We are using Browse as our main page and trying to eliminate places where a public user can either get lost or otherwise get to the pages that are hidden, etc. Also, any help in changing Error page to link back to home instead of to the  Welcome page would be greatly appreciated.

0 0

Answer

SELECTED ANSWER
replied on February 7, 2023

Stuart,

To hide the More option, open Browse.aspx file in a text editor, copy the code below, paste it right above the </body> element located at the bottom of the file, and then save the file.

<script type="application/javascript">
(function() {
   $(".more-dropdown").hide();
})();
</script>

To modify the Error page to link back to the Browse page instead of the default Welcome page, open the Error.aspx file in a text editor, copy the code below, paste it right above the </body> element located at the bottom of the file, and then save the file.

<script type="application/javascript">
	var x = document.getElementById("BackToWelcomeDiv");
	x.innerHTML = '<a href="<%= Page.ResolveUrl("~/Browse.aspx?" + dbRepoParam)%>">Back to Browse Page</a>';
</script>

Hope this helps!

Wesley Funderberg

0 0
replied on February 7, 2023

Thank you, Wesley. That was perfect!

0 0

Replies

replied on January 23, 2024

Hello there, I tried this and it did not work for me, but I am using Search in Weblink 11 and so I placed it in the Search.aspx just above the </body> as you stated for the Browse.aspx. I have saved it and restarted IIS, and reloaded the pages multiple times, and the "More" pull down is still there.

Any ideas?

0 0
replied on January 25, 2024

Darol,

 Looks like things have changed since this code was written. Below is the updated version that should work for 11.

 

<script type="application/javascript">
(function() {
   $("#moreDropdown").hide();
})();
</script>

Hope this helps!

0 0
replied on January 25, 2024

I attempted the in the search.aspx file but it didn't hide it. Am I missing something?

0 0
replied on January 25, 2024

Karim,

Please see my reply to Darol for the updated version of the code.

0 0
replied on January 26, 2024

Ok, I tried the new code in the Search.aspx and placed it above the </Body > element as suggested, however I might not have it just right. Below is the area of the aspx where I have it. It still does not work. I restarted IIS again, and reloading the Search page. I also tried it in the Browse.aspx just in case. Then even cleared cache, and cookies and restarted the browser. Still see "More". It does not look as clean below as it does in the aspx files but you see see the location where I placed it.

   

</head>

 

    <script type="application/javascript">

    (function() {

       $("#moreDropdown").hide();

    })();

    </script>

 

<body id="searchPage" class="ltr" style="overflow: hidden; height: 100%" runat="server" >   

     <search-app><div style="padding: 30%; text-align: center;">Loading...</div></search-app>

     <weblink:MediaDisplay id="mediaDisplay" runat="server" class="media-display"></weblink:MediaDisplay>

     <script type="application/javascript" nonce="<%= PageNonce %>">

         run({ str_json: <%= Str_JSON  %>})

     </script>

 

</body>

0 0
replied on January 26, 2024

Darol,

You need to put the code right above the </body> tag (near the bottom of the page) and not above the <body> tag.

0 0
replied on January 26, 2024 Show version history

Ok, I did try the original code in that location and it did not work, but now even with the altered code, it still does not. I am wondering if it might be conflicting with something else I might have tried, but again after restarting IIS, clearing cache and reloading, More still is showing up. Below is where it is now.

 

<body id="searchPage" class="ltr" style="overflow: hidden; height: 100%" runat="server" >   

     <search-app><div style="padding: 30%; text-align: center;">Loading...</div></search-app>

     <weblink:MediaDisplay id="mediaDisplay" runat="server" class="media-display"></weblink:MediaDisplay>

     <script type="application/javascript" nonce="<%= PageNonce %>">

         run({ str_json: <%= Str_JSON  %>})

     </script>

 

     <script type="application/javascript">

     (function() {

        $("#moreDropdown").hide();

     })();

     </script>

</body>

0 0
replied on January 26, 2024

A little more information. I created a new app, verified that the Search.aspx had the code above. When I use the Search with nothing special configured on the new Weblink app, I do not see the More and only the My Weblink. However as soon as I set up a Search Form, and Custom Link on the Welcome Page, the More button returns. If I remove the Custom Search, and reload the page and select Search at the top, it then shows only My Weblink again. So, my guess is that when using a "custom search" it must be using another file, or ignoring the code. Verified by re-adding the Custom Search, and restarting the browser, clicking on the Search on the Welcome Page and again More is there.

0 0
replied on January 31, 2024

CustomSearch.aspx

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.