How to search content of a single space in confluence that uses zen foundation theme
you could create your own search box, either using the HTML macro or if you want to make it a little more usable, a user macro. you then just drop in {search-current-space} in the page.
## Macro title: Search Current Space ## Macro Name: search-current-space ## Macro has a body: N ## Body processing: No Macro Body ## Output: HTML ## ## Developed by: Matthew Cobby ## Date created: 26/07/2011 ## Installed by: Matthew Cobby <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="$space.getKey()" /> <input type="text" accessKey="s" name="searchQuery.queryString" size="50"/> <input type="submit" value="Search Space"/> </form>
what you are trying to do is create an HTML form in the page like this:
<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 OF CURRENT SPACE**" /> <input type="text" accessKey="s" name="searchQuery.queryString" size="25"/> <input type="submit" value="Search Space"/> </form>
if you wanted, you could add extra parameters to the macro to search types of content, date ranges, formatting rules etc
You could reate a 'Search this space' landing page and add a search box macro to the page
Note, I don't know if the macros still exist in 4.x -- but that's how I would do it in 3.5x
Update: Sorry, I should have said a "Page Tree Search" macro. You have to specify the home page.
the only problem is that it misses out a lot of content, it won't search anything not under the home page, or other content like blog posts
That's true and yours is a much cooler solution, Matthew. But can OnDemand users create their own macros (or install their own plugins)?
ahh, my bad. I thought they now allowed some user macros but obviously not, it's still a restricted function. However, if you use the documentation theme, there is an option to restrict the search box in the top right to the default space
https://confluence.atlassian.com/display/AOD/Searching+Confluence#SearchingConfluence-SearchOptionsWhenUsingtheDocumentationTheme
You can then do it on a space by space basis.
It looks like you're new here. Sign in or register to get started.