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

Question

Question

How do I set so that Weblink goes to a Template search by default?

asked on February 18, 2015

I have an (eventually) public-facing Weblink site I'm working on.

I've read (and attended) the courses on customizing Weblink.

I've removed MyWeblink, for example, and the records management searches.  Good stuff.  :)

 

My one issue: If a user clicks on a link and goes to Browse.aspx, then clicks on the "Search" link at the top-left, I'd like the search to always come up as a Template search with a specific template already selected.

Is there a way to do this?

I'm not even sure what behavior it is currently using to determine what to show.

We will probably set up a search form also, but many users are used to using this method to search from Weblink v7.

 

Thanks in advance!

0 0

Answers

APPROVED ANSWER
replied on July 23, 2015 Show version history

This issue is fixed in WebLink 9 SP1. Please see KB 1013665.

When you are modifying the line of code and setting which search options you want to show or hide, just include the additional attributes

ResetSearchBlocks="True" AllowCustomization="True"

This way you can set the default search options, yet still allow users to modify the search as needed. Then when they come back to the search page, it'll go back to what was set as default.

0 0
SELECTED ANSWER
replied on February 18, 2015

You can edit search.aspx. Look for

<weblink:searchform id="TheSearchForm" ... />

and add the following attributes to that element: AllowCustomization="False" ShowWebLink="False" ShowField="True" TemplateDisplayed="MyTemplate"

The line will now resemble

<weblink:searchform id="TheSearchForm" runat="server" DynamicFieldLimit="10000" Height="100%" AllowCustomization="False" ShowWebLink="False" ShowField="True" TemplateDisplayed="General" />

 

1 0
replied on February 24, 2015

One quick question -

Our users want to be able to choose other searches if needed.  

If I set AllowCustomization="False" they seem to be able to do this, but it seems to save their customization setting between sessions.  

Is this stored locally?  It doesn't seem to be stored with the account.

 

Thanks!

0 0
replied on March 3, 2015

Hi Michael,

The selected search elements are saved via cookies in the user's browser.  The cookie is called WLChosenSearches and will look something like, "0=chosen&2=chosen&5=chosen"; each type of search is represented internally by a number.  That cookie is set to expire a year after it's set, so it'll last that long unless the user clears out his/her cookies.

0 0

Replies

replied on February 19, 2015

Alexander - you are awesome!  This is exactly what we need!

 

Thanks!!

0 0
replied on February 19, 2015

You're welcome. Glad to help.

0 0
replied on April 28, 2015

Do these settings also work in Weblink 9?  I ask because we tried this, but it did not change the template displayed when the user logged in.  This is after making the edit, and stopping and starting IIS.

 

 

 

 

0 0
replied on June 12, 2015

Can you post the code that you tried to use? On our internal installation, I made the changes mentioned above in WebLink 9 and it was successful. 

0 0
replied on February 26, 2020

no such settings in Weblink 10 ?

 

0 0
replied on August 25, 2020

I can't seem to find these options in WL 10.  Is there some other way to handle this now or is this functionality no longer available?

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

Sign in to reply to this post.