I have an old FrontPage redirected to my new Wiki homepage which is also the configured category root. This FrontPage contains now something like
#redirect CategoryRoot
I have already excluded FrontPage from all my search results by modifying the FullSearch macro, but it keeps showing up in the explorer tree (top level).
Is there a way to configure pages to be excluded from the tree? I believe this can be done in the page_category_regex pattern, but can't figure this out. AnkeHeinrich 2007-10-18 17:23:00
- In case anyone is interested in the solution I have now solved this by adding a new configuration variable and modifying the explorer theme correspondingly. In wikiconfig.py I have added the following variable:
explorer_ignore_pages = ['FrontPage']
In explorer.py I have added the following code to method explorer_theme_init:try: # Get the page names to be ignored in tree self.ignore_pages = self.cfg.explorer_ignore_pages except AttributeError: # if not set initialize with empty list self.ignore_pages = []
In explorer.py I have added the following code to method build_wiki_tree after all_pages has been defined:for page_name in self.ignore_pages: if page_name in all_pages: del all_pages[page_name] # Remove page to be ignored
Wolfgang, do you think this can be added to future versions of the theme? AnkeHeinrich 2007-10-26 21:55:36
There is currently no way to configure pages to be excluded from the wiki tree. Instead I recommend you to remove your FrontPage from the RootCategory and add it to any other category (or subcategory). Of course this won't hide the page but displaying it in an appropriate category probably won't disturb the users as much.
Wolfgang, This is my old FrontPage and it is not associated to any category. Instead I have redirected it to my new root category. This is what makes Moin and also the Explorer theme think it belongs to the root category. If I remove the redirect I can as well delete the page completely, but the above code provides a better solution for me. -- AnkeHeinrich 2007-10-29 10:45:00
I thought about a configuration option as proposed by you. You use this option in conjunction with a modified FullSearch macro. This shows to me that hiding pages from the users also includes modifications in other parts of Moin. If there will be a general option in Moin for hiding pages in a future version, then of course I will modify the ExplorerTheme accordingly. -- WolfgangFischer 2007-10-29 06:53:49
The modification of the FullSearch macro is only for my own lazyness. I can always pass a parameter -titel:regexp:FrontPage to the macro to exclude pages from the result. However, I don't have a similar option in the Explorer theme. But of course it's your decision what to include and what not and I respect this. -- AnkeHeinrich 2007-10-29 10:45:00
Ok, silly me. I had another look at the old page and the root category _was_ included in the text and not only in the directive. After removing it from there (and undoing my changes in the Explorer theme) the page did not appear in the wiki tree anymore. However, it still showed up in the list of sub categories of the new root page (FullSearch macro). Obviously this is not your problem and I can easily solve this. -- AnkeHeinrich 2007-10-29 14:30:00
a normal way to hide pages for users is using of ACLs -- ReimarBauer 2007-10-29 07:02:26
That's true. However, I'm not sure if this also solves the specific problem with an old redirected FrontPage. I'll try this out. Thanks. -- AnkeHeinrich 2007-10-29 10:45:00
I tried it now and it does work. I'm impressed! -- AnkeHeinrich 2007-10-29 14:30:00