Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Edit search results content

Coen Huijsmans December 11, 2013

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
Davin Studer
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.
December 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>

Coen Huijsmans December 15, 2013

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

Thanks for your help :)

Davin Studer
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.
December 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.

Coen Huijsmans December 16, 2013

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

0 votes
David Maye
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 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

Coen Huijsmans December 12, 2013

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).

Coen Huijsmans December 16, 2013

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events