How can I customize the text inside the Search Control?

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

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');

Please change Your String Here to relevant text.

Hope it helps

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!

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.

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.

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,099 views 17 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you