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

Question

Question

Removing Search Box on Browse/Search pages

asked on February 13, 2014

 Within the Weblink Designer there is an option in the "Welcome Page" to "Show Search Box". We have this disabled as this feature is to broad and we won't be using it.

 

However there doesn't seem to be a simple box to remove the same box from the top of the Browse and Search page. Is there a way in the designer to do this or will I have to edit them out in the .aspx code itself. Reason I am more hesitant towards this is I was told most custom changes made to the code will be undone in updates.

 

Thanks!

0 0

Answer

SELECTED ANSWER
replied on February 13, 2014

There is no way to disable the search boxes on top of the Browse and Search pages via an option in the WebLink designer. However, the change you need to make is very simple, just comment out the <div> that corresponds to the search box in Browse.aspx and Search.aspx:

 

<!--<div style="position:absolute; top: 0px;" class="SearchBox">
	<weblink:DocBrowserSearch ID="DocBrowseSearch" PostBackUrl="~/Search.aspx" runat="server" />
</div>-->

This way the search boxes will be disabled and you can easily bring them back if you desired. Be sure to make a note of any .aspx pages you've made edits to so you can more easily apply them post update.

 

0 0
replied on February 18, 2014

Thanks. I was hoping there would be an answer that would allow it to persist over any updates that replaces those .aspx pages but I guess I will have to deal with doing it manually each time.

0 0
replied on February 18, 2014

That's why I would recommend looking at doing these changes only in the CSS file. You'll only ever have to worry about backing up that one file. That was the method recommended at EMPOWER.

0 0

Replies

replied on February 13, 2014 Show version history

You should try to do it using CSS. Look in the WebLink directory for a file called WebLinkStyles.css (there something similar for WebAccess) and any customization you need to the bottom of the file. Figure out the ID of unique class that is used by the UI you want to hide and add a CSS rule like so:

 

/* This is just an example, you'll need to poke around in the aspx files or use your F12 tools to find the actual ID's and classes. */
#SearchBox {
    visibility: hidden;
}

Hiding it with CSS keeps the element available to reference so that the codebehind doesn't break, but still achieves the desired result.

 

EDIT: This technique was described in EDM207. You might be able to get a little more detail by looking over the slides and examples. You can also add a separate CSS file and reference it in the project, but the above technique means you only need to make changes to a single file. Remember to back it up after you make changes or an update could overwrite it.

0 0
replied on February 13, 2014

Hi

 

I have the same issue and I can't find the line (

<!--<div style="position:absolute; top: 0px;" class="SearchBox">
<weblink:DocBrowserSearch ID="DocBrowseSearch" PostBackUrl="~/Search.aspx" runat="server" />
</div>-->) that you are refering too.   I was looking into WebLinkStyles.css  file?
0 0
replied on February 13, 2014

I got it.  I found them uner Browse.aspx and search.aspx.  Thanks.

 

 

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

Sign in to reply to this post.