Forums

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

Display Search results on the same page as the Page Tree Search

Andrena December 3, 2018

I am using the Page Tree Search. I want just the results of the search to be displayed within the same page of the search, right below the search after pressing the search button. As it works now after you press the search button it goes to a completely different page. We have a template and want the user to stay on the same page and have the same look and feel versus going to a new page and losing all the navigation they should have with every page. 

 Basically want to combine the Page Tree Search with the functionality of Search Results Macro - this macro displays the search results within the same page. 

1 answer

1 vote
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 5, 2018

Hello Andrena,

The Confluence search and page tree search allow for easy discovery on content, including the ability to quick search for content using available macros. As stated, the search will take you to a search page which will load the dosearchsite.action which is designed to allow for additional search functionality (Search last modified, content type and additional filters).

If you wanted to run a search within an existing page without leaving the page, you can enable HTML on your instance and use an iframe to pre-load the search page. Here are steps on how to accomplish this:

  1. Login as your Confluence Admin, go to manage add-ons
  2. Enable all the modules of the Confluence HTML Macros
    1. This is listed under system add-ons
  3. Insert the Include HTML Macro when you are creating/editing a page.
  1. Go To Insert More Content > Other macros
  2. Search for HTML macro
  3. Paste the following code inside the macro.
  4. <iframe src="http://confluence.domain.com/dosearchsite.action?queryString=null" noborder="0" width="800" height="400" scrolling="yes" seamless></iframe>
    1. You can adjust the URL above to include a space or parent page:
    2. Example Space: 
      http://confluence.domain.com/dosearchsite.action?cql=space+%3D+"JPRO"
    3. Example for Parent/CurrentPage: 
      http://confluence.domain.com/dosearchsite.action?cql=parent+%3D+currentContent()
  5. Save your page.

image.png

Source Document: How to put an iFrame into Confluence

If this work around does not suit your requirements, you are welcomed to create a feature request. To create a feature request, navigate to Create Feature Request , select suggestion and fill out the required fields. Ensure you tell a story about how this feature will improve the experience and how it will add value. If you do create a feature request, please link it back to this post so other may find this request.

I hope you find this helpful and it give you a viable workaround to have search results displayed on a page without navigating away.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events