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

This widget could not be displayed.
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!

This widget could not be displayed.
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.

<script>

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

</script>

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
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

468 views 6 6
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