It's better when it's simple

User Tools

Site Tools


nodisp Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" yes
  • 2020-07-29 "Hogfather" yes

plugin Prevents selected text from being sent from server to browser based on acl; or hides display of text in browser, except from admin or manager

Last updated on


Install from the extension manager.

To install manually, refer to Plugins.


This plugin has two ways of concealing text from unauthorized users.

  1. In the first case, it conceals text from all viewers except users who are logged in and belong to either the admin or manager group. The text is still on the page, but not displayed. This means it can be viewed using the browser's view source facility.
  2. In the second case, an acl level is set and if the viewer does not have an acl level equal to or greater than the acl setting, the text is completely removed from the page. It is not output from the server to the browser. The same is true if the site allows viewers to view the page source using Dokuwiki's view source action.


The syntax for the first case

<nodisp> your text here </nodisp>

your text here

The syntax for the second case

<nodisp acl> your text here </nodisp>

<nodisp acl>
your text here

acl is the numeric representation of the acl level which is required for the marked off text to be output to the browser. In other words the viewer must be logged in and have acl rights for the page in order for the marked up text to be included in the page. So, for example, with <nodisp 8> the viewer must have upload permission or greater for the namespace where the page appears; with <nodisp 2>, the viewer must have edit permission or greater for the page, etc.

It's possible to have several nodisp blocks on a page, each with a different acl level, so that the current user might have access to one section of text and not another. For example, the user might have write permission 1) for a page but not create permission for its namespace. <nodisp 2> would mark off a passage which this user could view, but <nodisp 4> would mark off one which this user does not have access to. A user with create permission for page's namespace 2) would uhave access to both. The ACL levels are described in the acl documentation.

Newline syntax

{nodisp} your text here {/nodisp}

your text here

{nodisp acl} your text here {/nodisp}

{nodisp acl}
your text here

The <nodisp. . . > syntax sets off blocks of text. If you place two blocks, one after the other, there will be a paragraph break between the two. The newline syntax treats the enclosed text as a single line unless an extra newline (CR/LF) or the DokuWiki newline markup is inserted. This conforms to the practice of the DokuWiki editor. If you place one newline entry above another, they will continue on the same line unless a newline is inserted. See

If you are upgrading from an earlier version of nodisp, which does not support the newline syntax, you will have to remove the file syntax.php from the root directory of the plugin. This is now replaced by a new file called basic.php in the syntax directory.

Group Syntax

It is also possible to limit access to the hidden material by group. The syntax is the same as for the other cases, except that ACL numbers are replaced by a group names.

<nodisp group>
Restricted Data

{nodisp group}Restricted Data{/nodisp} 

Notice: The group name does not use the at-sign; it is group, not @group.


Change Log

  • 2016-01-16 by Michael Hamann
    • Fix method signature compatibility for PHP 7.0
  • 2013-02-14 by Michael Hamann
    • Cache is automatically disabled now, no need for ~~NOCACHE~~ anymore
    • The plugin uses a <div>-Element now as it had the paragraph type stack anyway which meant that a new paragraph was opened inside the plugin and thus the plugin worked on block level and using a <span>-element produced invalid HTML.
    • Allows more syntax (paragraphs, lists, tables, …) inside the plugin

Known Bugs and Issues

Can you add this warning in the description of your plugin? Thanks. The page source is always visibile clicking the “show pagesource” button. — anto1945 2013/07/22 07:25

This is true for all the plugins which “hide” material. The only way to get true hiding is to use the include plugin. See the forum for this thread:

The above limitations are no longer true of nodisp. See above: examples_usageMyron Turner 2020-03-13 16:53

acl 2
acl 4
plugin/nodisp.txt · Last modified: 2023-10-30 23:24 by Klap-in

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