DokuWiki

It's better when it's simple

User Tools

Site Tools


config:hidepages

This is an old revision of the document!


Configuration Setting: hidepages

This option accepts a Regular Expression to filter certain pages from all automatic listings (RSS, recent changes, search results, index, sitemap). This is useful to exclude certain pages like the ones used in the sidebar templates. The regexp is matched against the full pagename with a leading colon. If it matches, the page is assumed to be a hidden one. This is a rather cosmetic option, not a security one.

  • Type: String
  • Default:

Example

Here's complex example excludes :reports:template, :reports:sidebar and their subpages:

$conf['hidepages'] = '^:reports:(?:template|sidebar)';

Another example. In this case the contents of /data/pages is

.
├── admin
│   ├── build_notes.txt
│   ├── new_software.txt
│   └── todos.txt
├── admin_links.txt
├── labels
│   └── start.txt
├── playground
│   └── playground.txt
├── sidebar.txt
├── software
│   ├── dokuwiki
│   │   └── start.txt
│   ├── kdialog
│   │   └── start.txt
│   ├── start.txt
│   └── __template.txt
├── start.txt
├── templates
│   └── start.txt
└── wiki
    ├── dokuwiki.txt
    ├── syntax.txt
    └── welcome.txt

To hide admin_links, sidebar, and everything beneath :admin, :labels, :playground, :templates, and, :wiki, use:-

$conf['hidepages'] = '^:(admin*|sidebar|playground|labels|templates|wiki)';

Sitemap

See also

Discussion

Please, could you provide the syntax to use for hiding the sidebar file? I tried a lot of things in the hidepages option but he sidebar always. I tried sidebar, sidebar$, ^(?::sidebar)$ but none of them works. Thanks for your help.

Use ACL to hide the sidebar file in listings. Set permission for group ALL to “none”. The sidebar will still work.

Same to me.. Nothing works :-( item “sidebar” still in menu.

Just sidebar works. If it doesn't you should submit a proper bug report with additional information. — Anika Henke 2015-08-17 23:25

I love this config. Just suits my need to unpublish a public page but still make it available to a certain group of people. I love DokuWiki. It's so delicate and feature-rich. You guys are all blessed genius. — MilchFlasche 2017-10-21 08:22

For those who (are less regex savvy and) wish to utilize this feature from their wiki's Configuration Manager plugin, go to the hidepages listing in the Display section. Using the first example from above, you would enter

reports:template|sidebar

Remember to click the Save button. (Apologies if this is an improper use of the discussion since it pertains to a specific plugin.) — Melissa Glidewell 2019-1-9 12:15

config/hidepages.1547065058.txt.gz · Last modified: 2019-01-09 21:17 by Melissa Glidewell

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki