How to Hide an Inclusion Library from the {recently updated} and the {livesearch} macros ?
Asked by Pierre Hilson:

Hi,

I'm building a knowledge base and my article templates are based on {include page} parts.

I planned to have those parts as pages in an 'inclusion library' as explained at <https://confluence.atlassian.com/display/DOC/Creating+your+Technical+Documentation+Space#CreatingyourTechnicalDocumentationSpace-Step5.CreateanInclusionsLibrary>

My inclusion library is stored at the root of my Wiki and the restriction set on the pages under the _InclusionLibrary are only restricted in edition.

Unfortunatelly, those parts then appear in my LiveSearch and in my RecentlyUpdated results.

How should I proceed to avoid that ?

Thanks,

Pierre


Answers:
author: Pierre Hilson
body: OK. I got my Confluence site upgraded so I can Archive a space.

It is a workable solution.

Thanks.

Pierre


author: Pierre Hilson
body: Hi Sarah,

I thought about the second space. My problem was that I think the second space needs to be viewable by my readers and this is a bit a mess. I would have preferred to find a way to hide a page but still be able to include it in other pages.

Maybe I could use a TemplatePage which a user has no right to see or modify.

```
{cache:index=true}{include:TemplatePage}{cache}

The following page reports that the {cache} macro bypasses the restrictions.
http://ffeathers.wordpress.com/2011/05/15/making-the-include-macros-content-appear-the-confluence-search-results/

Is there a way to have the pages of a space readable by a user but the space itself hidden ???

Best regards,

Pierre
```


author: SarahA
body: Hallo zorglups

It's not possible to hide the pages from the search if they're in the same space. One trick may be to put your inclusion library into a different space. They then won't appear in search results that are specific to your main content space.

You can configure the Documentation theme so that it shows search results from the current space only. (This does not affect the LiveSearch macro.)

Taking it a step further, you can try archiving the space that contains your inclusions library. I don't know for sure whehter archived spaces are hidden from the LiveSearch macro. They are certainly hidden from the main search, the pagetree search, and various dropdowns in the editor and in selection menus.

The ability to archive a space is new in Confluence 4.3:

<https://confluence.atlassian.com/display/DOC/Archiving+a+Space>

Let me know how this technique works for you. I've been planning to blog about it, but just haven't had time yet. :)

Cheers, Sarah

comments: author: SarahA
body: Hallo Pierre

You can't hide the second space entirely, because then, as you've pointed out, the readers woudn't be able to see the content in the main space.

The problem is a little mitigated by the fact that the Inclusions Library is at the root of the space - so ordinary readers won't the see pages. And now, using space archiving, you can also hide the content from the search.

Here's a blog post I did, about a space where I did just that (except that I haven't archived the space, because space archiving was not available at that time):

<http://ffeathers.wordpress.com/2011/04/03/content-reuse-on-a-wiki-a-case-study/>

There's a link in the post to the space (USERMAN) so you can see what it looks like.

Cheers, Sarah


author: Pierre Hilson
body: Thanks. I'll be upgrading to 4.3 soon. I moved all my template parts to another space that I will archive to hide it.


author: Stefan Kleineikenscheidt _K15t_
body: I think that is not possible. If you restrict the page, the includes wouldn't work anymore.

-Stefan

comments: author: Pierre Hilson
body: Thanks.

It is a bit painful. Anyone wanting to build a professional looking KB should base it on templates but those templates should not appear to the end users in the search results or the other lists.

Anyone else having an idea or a trick to share ?