Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I customize the text inside the Search Control?

Roy Youngman September 17, 2012

We use the Documentation theme quite a bit and a search control is automatically included on the upper-right of every page. Inside the control, the words "Search Confluence" appears before you actually type any search text in the field. We'd like to change what appears in that control but I can't find what "properties" file contains the text that gets displayed. Any ideas? Thanks.

3 answers

1 accepted

0 votes
Answer accepted
RianA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2013

Hi Roy,

You could put the following on the Confluence Admin >> Custom HTML >> At end of the HEAD

<script type="text/javascript">
AJS.toInit(function() {
AJS.$('#quick-search-query').attr('placeholder','Your String Here');
});
</script>

Please change Your String Here to relevant text.

Hope it helps

Roy Youngman March 13, 2013

Thanks both Uday and Rian, this worked (mostly). It solves my basic problem. Unfortuantely, it leaves a little artifact on a space that uses the Adaptavist Theme Builder but that is a small matter. It works prefectly on all the main spaces in our site and is a good technique to recommend to others who are trying to brand their sites. Appreciate the help!

0 votes
UdayK
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2013
AJS.toInit(function() {
AJS.$("#header .quick-search-query").val("your search Text Here");
});
The above code will work. you should add the line betwen toInit() method.
Place the aboce code in custom HTML-->At the end of the Head.
0 votes
UdayK
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2013

AJS.$("#header .quick-search-query").val("your search Text Here");

You can place this in 'At end of the HEAD' section.

Hope this will help.

Roy Youngman March 13, 2013

Tried it. All that happenned was the "AJS.$("#header.quick-search-query").val("My Search Test");" showed up as a text string above the menu bar. I'm sure I'm doing something wrong, but still looking for a solution.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events