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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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
Highlighted

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

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

343 views 23 8
Join discussion

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