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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

limiting search box to a space by default

Using Confluence 6.11 Server - How do we constrain the results of a search to a specific space versus returning matching results from multiple spaces?  We understand the use of filters.

1 comment

Hello Ron, not sure if you can change the quick search in the top right corner to default to the Space, but you can add search boxes in any page in Confluence, and limit it to search that particular Space alone.

To do this, we will need to use the HTML macro. (This macro will be disabled by default, but you can enable it from the Manage add-on page.

<form method="POST" action="/dosearchsite.action" name="searchForm" style="padding: 1px; margin: 1px">
<input type="hidden" name="quickSearch" value="true" /> 
<input type="hidden" name="searchQuery.spaceKey" value="spacekey" />
<input type="text" accessKey="s" name="searchQuery.queryString" size="25"/>
<input type="submit" value="Search Space Name"/>
</form>

Once you've inserted the HTML macro, paste the code above, and change the "spacekey" value, to the spacekey of the space you want to limit the search for.

This will add a search box into any page you use the HTML macro with the code above, like below, and limit the search to that space alone.

search_box1.PNG

search_box.PNG

The original solution above was posted in the community question below, and you will find other solutions there as well.

Do let me know if you have any question.

Cheers,
Sattesh

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Confluence

🏑 Atlympic Event: Confluence

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

502 views 18 17
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you