Edit search results content

I'm looking for a way to edit the search results content. In our situation a search results in lots of attachments, since these attachments are just printscreens of our manual (with a filename that correspondents with the search) we would like to exclude the attachments by default.

Stated differently, our goal is that the search results on the '/wiki/dosearchsite.action' page only shows 'pages' content instead of 'all content' by default. Maybe in the future we would like to add 'questions' to the search results as well.

Hope anyone can help me. Thanks for your response in advance.

2 answers

0 votes
David Maye Atlassian Team Dec 11, 2013

Currently, you can select a few options when it comes to searching in Confluence on the 'wiki/dosearchsite.action' page (including only selecting 'Pages' or 'Questions' content). Are you asking to have 'Pages' selected instead of 'All Content' by default when the search page loads up?

Confluence Search

Yes, I'm indeed asking if it is possible to show only 'pages' by default instead of 'all content' when the page loads up.

We have this want since we use Confluence for manauls and documentation that is available for our external customers (anonymous users).

David, can you pls response on my comment. Thanks!

0 votes
Davin Studer Community Champion Dec 12, 2013

In the Custom HTML section of Confluence Admin you could add some javascript to to add a hidden input element to the form with the id of "quick-search" to specify the type.


AJS.$("#quick-search fieldset").prepend('<input type="hidden" name="type" value="page">');


We use the OnDemand version. Is it still possible to add the script you mention?

Thanks for your help :)

Davin Studer Community Champion Dec 15, 2013

Um, I'm not sure. Probably not, but just check in Confluence Admin -> Look And Feel. If there is an option for Custom HTML then yes you should be able to use it. I can't remember if that is enabled in OnDemand or not ... me thinks no.

You're right, I can't find this option under Look And Feel.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,491 views 4 13
Read article

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