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

Search in Confluence in child pages -- how to?

Rumceisz Feb 25, 2015

Hi Everyone,

many users of our Confluence need a search function which search only in the current page and its child pages. They have plenty levels of page hierarchy and they don't want to search through the whole space.

Is there a feature for this?

 

Thanks,

Rumi

2 answers

1 accepted

0 votes
Answer accepted
Steven Behnke Community Leader Feb 25, 2015

Hello @Rumceisz,

You are asking for a page tree search, so why don't you use the page tree search macro? Page Tree Search Macro Screen Shot 2015-02-25 at 9.39.22 AM.png

This will combine your search with the ANCESTORID:Page ID to search under AND "User's search terms," and will net you the results you are looking for. For the record, this searchs PAGES and ATTACHMENTS, not COMMENTS.

 

 

1 vote
Chuck Talk Atlassian Team Feb 25, 2015

Hi @Rumceisz,

You can either choose to limit your search using the built in filter to search within the Space, or you can use the customization provided by @Giuliano de Campos found here as follows:

This cuztomization requires you to use it under the HTML macro: 

https://confluence.atlassian.com/display/DOC/HTML+Macro

You can try the following customisation with on your page/space: 

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

Replace the value of "spacekey" in the searchQuery.spaceKey hidden item for the space key of your space.

You only need to insert it through the desired page/space and then replace the name="searchQuery.spaceKey" for name="searchQuery.The Space Key of your Space".

In example, I have a space named "Careful With That Axe, Eugene" and the spacekey for it is CTE. I've replaced the SearchQuery to name="searchQuery.CTE".

I do hope this helps and Kudos to @Giuliano de Campos for the answer. wink

Sincerely,

Chuck Talk | Confluence Support
Atlassian

 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

1,159 views 7 18
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