It's better when it's simple

User Tools

Site Tools


dwinsect Plugin

Compatible with DokuWiki

2012-01-25 "Angua"

plugin Inserts a full section or only the first link in the section. The section-text can be used as a footnote. Includes a toolbar-button to editor.

Last updated on
Syntax, Action

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to embed, include

Tagged with footnotes, include, links


Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually. Take care that the directory-name of the plugin is: dwinsect

You need the dwtools-library. (look to the end of description where to get it)

Purpose of this plugin

Basic purpose of DWinsect plugin

With DWinsect plugin you can easy include a section of a page in two different ways:

  1. Include the whole section as it is (Headline, and section - text)
  2. Include the first link1) that is found in the section
    and include the text before an after that link as
    1. plain text
    2. a footnote

Main purpose of DWinsect plugin

The main purpose of the DWinsect plugin is to use it like you use your favorite links in your browser.
You can refer to that link everywhere in your dokuwiki. If the link is broken you have to change the link only one time an not everywhere in your dkuwiki.

Thats all you have to do:

  1. craete a new page anywhere in your dokuwiki (e.g. name it “favorites” in the namespace “wiki:”)
  2. edit the page and insert all your favorite links.
  3. add to each link a headline with a symbolic name of the link
  4. you can add any text before or after the link as a description (option).
  5. use DWinsect-syntax anywhere in your dokuwiki


syntax description usage default value
[*( open-syntax needed
ns: any valid namespace optional namespace-default
page any pagename in the namespace optional default value can be set in the configuration page
# delimiter optional needed if a namespace or pagename is used to seperate ns:page from anchor
anchor name of the dokuwiki headline needed
? delimiter optional needed if anchor parameters are used to seperate anchor from aparams
aparams anchor-parameters optional default value can be set in the configuration page
lparams link-parameters optional by default the link-parameter of the favorite link is used
)] close-syntax needed


The name of the anchor is case sensitive und must match the name of a headline that exists.
:!: The Headline “Google” is differnt to the Headline “google”. If the same headline occurs more than one time, the first hedline is choosen.


name1=value1&name2=value2name3=value3 ...
name value description
text none no text before an after the link
plain text with dokuwiki-syntax before and after the link
footnote same as plain, but text as footnote before an after the link
link none no link
plain original link
translate if set, use lparams instead of the original link-params
include none nothing to include (empty)
plain include the whole section (headline an dokuwiki-text inside the section)
link include the first link


Each valid value that is allowed in dokuwiki-links after the “|” or in media-links after the “?”. If you want to use named medialinks something like |my named linktext?50x200 creates a name medialink (my named linktext) and changes the parameters to 50×200.

With the aparams you can decide if the original or the DWinsect parameters are used.


If no namespace is given, the plugin searches from the actual namespace looking for the page recursively until root is reached. If no page is found the DWinsect-syntax appears as *(ns:page#anchor?aparams|lparams) with the css used for non existing links (normally red font with a red dotted underline).


Page with favorites

e.g.: content of “favorites” in the root

== Google ==
Google is a search engine. You can find more at [[|Wikipedia]].

== Yahoo Deutschland ==
You can try Yahoo too, but [[|this is not GOOGLE.]]Yahoo is another search engine.
DWinsect - syntax Result description
[*(Yahoo Deutschland)] [[|this is not GOOGLE.]] use original linktext
[*(Yahoo Deutschland|)] [[]] clear linktext
[*(Yahoo Deutschland| )] [[|Yahoo Deutschland]] change linktext to headline
[*(Yahoo Deutschland|YAHOO)] [[|YAHOO]] change linktext as defined

Examples for using DWinsect

Assume the plugin configuration defaults are:

name value description
text none dont show the text bevore and after the link
link translate use the lparams if set and overwrite the original link-params
include link use the first link in the section

The DWinsect - syntax results are:

DWinsect - syntax Result description
[*(Google)] just take the original link
[*(google|GOOGLE)] *(google|GOOGLE) :!: case sensitive: headline google is not defined
[*(Google|GOOGLE)] [[|GOOGLE]] change the name of the link to “GOOGLE”
[*(Yahoo Deutschland|YAHOO)] [[|YAHOO]] change the name of the link to “YAHOO”
[*(Yahoo Deutschland?text=footnote|not YAHOO.)] ((You can try Yahoo too, but ))[[|not YAHOO.]]((Yahoo is another search engine.)) show the text before and after the link as a footnote
[*(Yahoo Deutschland?text=plain|not YAHOO.)] You can try Yahoo too, but [[|not YAHOO.]]Yahoo is another search engine. show the text before and after the link as plain text
[*(Yahoo Deutschland?include=plain|not YAHOO.)] == Yahoo Deutschland ==
You can try Yahoo too, but [[|this is not GOOGLE.]]Yahoo is another search engine.
include the whole section as plain text

:!: You can use the syntax inline. No additional paragraphs are added. The text is shown inside footnote with full dokuwiki-syntax

Change Log

[preferable GitHub RSS feed or similar]

  • 2012-07-01
    • Initial release

ToDo/Wish List

:-( There is a bug when usin the syntax inside a list:

If in page links the link-section is defined as:

====Link to dwinsect-plugin====
Text before link
Text after link

and a syntax like this is used:

* [*(links#linkname#Link to dwinsect-plugin|test)]

the output gets to:

The text before or after the link, that is rendered as plain text or as a footnote is always placed after the link / url. Using the syntax not in a list works fine.

I am working to patch the bug.

:!: bug fixed now, made several changes to the syntax.php.


yet emty.

Other Plugins

any valid dokuwiki-link is allowed
Text before link
Text after link
plugin/dwinsect.txt · Last modified: 2018-05-30 21:59 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