We currently have our product releases in their own space with their own inclusion library. After releasing a new version of a product we copy the space with it's own inclusion library to create the next set of documentation for the new release. When one of our employees goes to include a specific page using the include macro the search feature is finding multiple identically named pages for the old inclusion libraries in the now old spaces.
I've tried creating a macro that wraps the include macro but the only option to search for a page is the confluence-content type and that does not have an option to limit the space to just @self.
it's not exactly what you're after, but you can type in the spacekey first. Also note that if you hover over the page, the link tip can help.
Are you open to build a new plugin/macro? If so you could achieve it by limiting the js search by space.
I've seen the instructions to include the spacekey, but when you add the spacekey the js search stops working. Requiring our users to know the exact title of the page they want to include really slows down their workflow.
I am totally fine creating a plugin or macro but I was unable to find a way to limit the js search by a space. Could you point me in the right direction on how to do that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Browse to a spaces' blogs, and start searching. you'll notice that the javascript for that is limited to the blogposts in this space. The file that controls this is
./confluence-project/confluence-core/confluence-webapp/src/main/webapp/includes/js/contentnamesearch.js
In that file is the code snippet for the javascript you're after:
if (spaceBlogSearchQuery.length && confluenceSpaceKey.length) { spaceBlogSearchQuery.quicksearch("/json/contentnamesearch.action?type=blogpost&spaceKey=" + AJS("i").html(confluenceSpaceKey.attr("content")).text(), null, { dropdownPlacement : quickNavPlacement(spaceBlogSearchQuery) }); }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.