目录
Blog Plugin
—- plugin —-
description: Use DokuWiki as blogging tool
author : Dokufreaks (previous author: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner)
email : freaks@dokuwiki.org
type : syntax, action, helper
lastupdate : 2023-10-24
compatible : Librarian, Kaos, Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum
depends : include, pagelist
conflicts :
similar : blogtng, miniblog
tags : blog, news
downloadurl: https://github.com/dokufreaks/plugin-blog/archive/master.zip
bugtracker : https://github.com/dokufreaks/plugin-blog/issues
sourcerepo : https://github.com/dokufreaks/plugin-blog
Description
The Blog Plugin makes blogs in your wiki easily possible. The blog component shows the latest entries (pages) from a namespace in reverse chronological order. In this new version, the creation date is the sort key – no longer the date of the last non-minor modification as in previous versions. The archive component lists all entries that were written (created) in the given month.
Installation
| Download | plugin-blog.tgz |
|---|---|
| BundleHub | Configure your own DokuWiki blogsuite install package, consisting of all mandatory plugins plus any optional features you want to include: BlogSuite BundleHub Site seems to be down for sime time, here is the archived version if you want to see possible optional plugins & features. |
| Tips | If you intend to use this plugin be sure to take a look at the blogging tips page |
Syntax
Blog
| [namespace] | namespace for the blog; subspaces will be searched as well; * is the whole wiki, . is the same namespace as the page lies in | optional; default is the blog namespace set in the configuration |
|---|---|---|
| [number] | number of entries to show per page | optional; default is 5 |
| [flags] | flags are delimited by & | |
| all Include plugin flags are supported | optional | |
Form placement: topform/bottomform/noform | optional, default is topform |
|
Custom new-entry form title: newentrytitle=Custom title | optional, can also be set as a configuration option | |
Hide paging controls: nopagingcontrols | optional |
This includes a specified number of most recent blog entries from the given namespace into the current page. Below the entries a link to the page (permalink), the author, the creation date and the number of comments are shown. Link, author, date and comments info can be hidden. At the end of the blog a link to older entries lets you navigate in the history of the blog. At the very end, if you have enough rights to create new pages, a form for new blog entries is displayed.
Note that when the page with the blog syntax is in the specified namespace, content my be shown twice. At some point, the loop will be detected and stopped. You should therefore make sure that either the page with the listing is in a different namespace or use the excluded_pages-option to explicitly exclude the blog page from the blog listing.
Archive
| [namespace] | the namespace for which you want an archive list; * is the whole wiki, . is the same namespace as the page lies in | optional; default is the namespace specified in the configuration |
|---|---|---|
| [month] | the month for the archive list in YYYY-MM format; * for all pages | required |
| [flags] | pagelist flags delimited by &, see flags | optional |
| [username] | username of an author | optional |
Shows a table with all pages of the given namespace that were created in the specified month.
Creates an automatic archive.
Configuration and Settings
The blog plugin can be configured using the DokuWiki configuration manager available in the admin menu.
namespace | The default namespace which is used if no namespace was given in the syntax |
|---|---|
formposition | You can choose to display the new entry form either above or below the blog entries |
newentrytitle | Set a custom title for all new entry forms. This can also be set on individual blog forms. |
dateprefix | A date prefix that automatically gets added to pages created with the new entry form. You can use the options from the strftime PHP function; namespace separators work as well, e.g. %Y:%m%d |
sortkey | Defines how the blog entries are sorted. Available options are creation date, modification date, page name, page ID and page title (first headline) |
sortorder | Sort the blog entries ascending/descending |
excluded_pages | Exclude certain pages from the blog listing. Requires a regular expression. Use for example !(^|:)start$! in order to exclude start pages from all blog listings. To exclude both start and rightsidebar directly below :blog use !(^|:)blog:(start|rightsidebar)$! |
showhistogram | Display a histogram in normal archive mode (not for autoarchive) |
max_months | Maximum number of months to show in the histogram |
histogram_height | Height of the histogram (in pixels) |
Changes
* 2013-10-20: Translation updates, fix cache handling for empty blog listings
* 2013-03-27: Better cache handling for the archive syntax
- the syntax that lists everything till now correctly updates the cache now whenever a page is changed or a comment or linkback is added.
- the cache is not used anymore when it contains an archive listing with a page that the current user can't access. The excluded pages won't be included again automatically unless the cache expires for other reasons, the
~~NOCACHE~~macro can be used if this is needed.
Development
Change Log
- Merge pull request #126 from dokuwiki-translate/lang_update_848_17143… (2024/05/01 23:45)
- translation update (2024/04/29 14:20)
- Version upped (2023/10/25 05:50)
- Merge pull request #121 from fiwswe/fix_issue_120 (2023/10/25 01:51)
- Rename constructor (2023/10/24 18:10)
- Merge pull request #118 from dokuwiki-translate/lang_update_564_16764… (2023/02/17 03:25)
- translation update (2023/02/15 08:35)
- Merge pull request #117 from dokuwiki-translate/lang_update_551_16745… (2023/01/25 04:45)
Bugs / Feature Requests
Please report bugs or feature requests at the Bug tracker.
FAQ
Please also have a look at the blogging tips page!
My dates are shown wrong. What can I do?
Make sure you run the latest version of all required plugins and DokuWiki.
Is it possible to change the way the date is displayed?
Yes, the plugin uses the dformat option to format the date.
How can I alter the date of a blog post?
You can use the meta plugin to manually set the creation date (and modification date) in the page source, then select the modification date in the blog plugins order setting. An alternative solution would be to alter the timestamps of the created files.
Is it possible to show table of contents?
The table of contents is shown automatically (depending on the settings in DokuWiki itself) from version 2013-02-07 on.
The header is always a link to the page even though it's disabled in the include plugin settings
The blog plugin assumes that in the context of a blog the header should be a link. However from version 2013-02-26 on it is possible to disable this behavior by using the nolink-flag, the blog plugin now only sets a default without overriding the nolink flag.
Is it possible to show just the first lines of each post with a 'Read more' link to view the full post?
I think I solved myself.
In the blog mark, use the following flags
This will work if you add an H2 header (in the full post) where you want to make appear the 'Read more' link.
If you don't need or want an H2 header in your post, you can add a empty H2 header, just as a delimiter for the text you want to show in the Blog's headlines
the excluded_pages does not work
In the blog mark ,use the following flags
Include Plugin
—- plugin —- description: Include another wiki page into the current one author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, helper lastupdate : 2025-07-22 updatemessage: Since the release of June 2025, minimal PHP 8 is required. compatible : Greebo, Frusterick Manners, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : conflicts : mediasyntax, PhotoGallery similar : wst tags : include, embed
downloadurl: https://github.com/dokufreaks/plugin-include/tarball/master bugtracker : https://github.com/dokufreaks/plugin-include/issues sourcerepo : https://github.com/dokufreaks/plugin-include/ donationurl:
The 2018-11-29 release fixes a security issue where ACLs were ignored for pages in namespace includes with DokuWiki version Greebo. If you rely on ACL checks in namespace includes or allow edits from users who must not see all pages, please upgrade ASAP!
This is a handy plugin with which you can include another wiki page into the current one. Just including certain sections of a page or even whole namespaces is supported, too.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
If you need support for older version of DokuWiki you can try the 2009-11-27 version of the include plugin, but please note that this old version has known bugs. If you need support for older versions of DokuWiki in the current include plugin version please open a feature request in the issue tracker.
Examples
{{page>wiki:syntax#Tables}} will include the section about tables of the syntax page.
{{namespace>project_foo}} will include all pages in the project_foo namespace.
{{page>blog:mypage&tags&comments}} will include the page blog:mypage and show the tags from the tag plugin and the number of comments from the discussion plugin. Both plugins need to be installed for this example.
{{tagtopic>testtag}} will include all pages with the tag testtag, the tag plugin needs to be installed for this example.
Syntax
The plugin offers four syntaxes, {{page>...}} , {{section>...}} , {{namespace>...}} and {{tagtopic>...}}.
Section is aimed more at including sections, page at including whole pages and namespace at including whole namespaces. Tagtopic includes all pages with a tagtopic tag.
{{page>[id]&[flags]}}
{{section>[id]#[section]&[flags]}}
{{namespace>[namespace]#[section]&[flags]}}
{{tagtopic>[tag]&[flags]}}
| [id] | page ID of the page to include; some macros are possible; shortcuts are resolved (:, ., ..) | required |
|---|---|---|
| [section] | limits the included page to a specific section and its subsections | optional; default is the whole page , this can be used with namespace (if matches) |
| [tag] | include pages with tag topic tag, requires tag | required |
| [flags] | flags delimited by &, see flags | optional |
Configuration and Flags
The plugin can be configured in the DokuWiki configuration manager available in the admin menu. These settings also affect the blog plugin which uses the include plugin to generate the blog page. For most settings there are flags that allow to override the setting. Some features are only available as flag.
| Configuration option | Flags | Description |
|---|---|---|
noheader | noheader/ (show)header | Don't display the header of the inserted section |
firstseconly | firstsec(tion)only/ fullpage | Display only the first section of the included page |
readmore | readmore/noreadmore | Show “read more” link in case of firstsection only |
showtaglogos | - | Show/hide an image for the first tag (if the page has tags) |
showfooter | footer/nofooter | Show/hide page footer below the included page |
showlink | link/nolink | Makes the first headline of a included page/section a link to the included page/section |
showpermalink | permalink/ nopermalink | Show/hide a permalink to the included page in the page footer |
showdate | date/nodate | Show/hide creation date of the page in the page footer |
showmdate | mdate/nomdate | Show/hide modification date of the page in the page footer |
showuser | user/nouser | Show/hide user name of the page creator in the page footer |
showcomments | comments/nocomments | Show/hide number of comments in the page footer (requires the discussion plugin) |
showlinkbacks | linkbacks/nolinkbacks | Show/hide number of linkbacks in the page footer (requires the linkback or backlinks plugin) |
showtags | tags/notags | Show/hide tags in the page footer (requires the tag plugin) |
showeditbtn | editbtn or editbutton/noeditbtn or noeditbutton | Show/hide edit buttons (section edit buttons, edit button below the included page) |
doredirect | redirect/noredirect | Redirect back to original page after an edit |
usernamespace | - | Namespace for user pages (see showuser configuration) (default user) |
doindent | indent/noindent | Indent included pages relative to the section of the page they get included in |
linkonly | linkonly/nolinkonly or include_content | Display only a link instead of the whole page content |
title | title/notitle | Show the title instead of the page id |
pageexists | pageexists/ nopageexists | Only list page ids of existing pages (see existlink) |
| - | existlink | Display a link and do so only if page page-id exists (combination of linkonly and pageexists) |
parlink | parlink/noparlink | (Don't) put the link into a paragraph environment (for inline lists) |
order | order=OPTION | Ordering criteria for namespace includes, possible options: page ID (id), title (title), date created (created), date modified (modified), indexmenu sort order (indexmenu), custom sort order using the {{include_n>[number]}} on the pages that are included similar to the indexmenu tags (custom). |
rsort | rsort/sort | Reverse the sort order in namespace includes. |
depth | depth=DEPTH | The maximum depth of subnamespaces of which pages are included in namespace includes, default is 1 for only the specified namespace, 0 is for unlimited depth. |
| - | inline | Don't close/open sections when including a page. This flag should be used when the include syntax is used inside other syntax elements like lists or tables or inside other plugin syntax. |
| - | beforeeach=ENTITY/ aftereach=ENTITY | Display an entity before/after each included page. The entity is printed outside the section/include environment, this is mainly for adding custom HTML code (when the text isn't recognized as entity it is directly displayed but escaped so you can't directly use HTML code here). |
safeindex | - | Don't index metadata of included pages that are non-public. This can cause problems with other plugins that use the metadata index and can be safely disabled in wikis where the permissions of the included pages match the permissions of the parent pages. |
| - | exclude=/REGEX/ | Regular expression to exclude certain pages, will match on full page ID. E.g. to exclude ns:page_name use /ns:page_name/ as value. Use a regex tester to debug complicated patterns. |
Examples:
{{page>concept&firstseconly&footer}}
{{page>mypage&noindent}}
{{namespace>myns&order=modified}}
{{namespace>myns&exclude=/myns:subns:.+|myns:page/}}
Macros
Simple macros are possible to serve a page on a per user or per date base. These are:
| @USER@ | username |
|---|---|
| @NAME@ | full name of user |
| @GROUP@ | first group the user belongs to |
| @YEAR@ | 4-digit year |
| @MONTH@ | 2-digit month |
| @WEEK@ | 2-digit ISO week number |
| @DAY@ | 2-digit day |
| @DATE<expr>@ | use a calculated date instead of today in date macros |
<expr> in @DATE<expr>@ can be one of:
| PYEAR | previous year |
|---|---|
| NYEAR | next year |
| PMONTH | previous month |
| NMONTH | next month |
| PWEEK | previous week |
| NWEEK | next week |
| YESTERDAY | yesterday's date |
| TOMORROW | tomorrow's date |
Examples:
{{page>@MONTH@:@DAY@:birthdays}}
includes the page birthdays in namespace <month>:<day>: eg. 10:15: birthdays for the 15th of october.
{{page>@USER@:message}}
includes the page message from the namespace <user> of the logged in user
{{page>foo@DATENWEEK@@YEAR@:@WEEK@}}
includes the page <weekno> from the namespace foo<year> with next week's date e.g. foo2012:01 for the 27th of december 2011
Demo
There is currently no demo site available.
Use of the plugin is shown in this video here: https://www.youtube.com/watch?v=6RO8TSZBedU&t=8m47s
Video not available (2021-03-20)
Development
Change Log
- Version upped (2025/07/23 07:04)
- fix tag for minimum php version (2025/07/23 03:38)
- Version upped (2025/07/05 07:04)
- Merge pull request #363 from dokufreaks/tests (2025/07/05 01:49)
- replace strftime use with dformat (2025/07/04 23:20)
- use newer DokuWiki test workflow (2025/07/04 23:15)
- Merge pull request #360 from dokuwiki-translate/lang_update_1151_1748… (2025/07/04 23:10)
- add minimum php requirement to plugin.info.txt (2025/07/04 23:05)
Bugs / Feature Requests
Please report bugs or feature requests at the Bug tracker.
Known Bugs and Issues
There are currently no known bugs and issues for which no workarounds exist (see FAQ).
FAQ
The include plugin breaks the wrap and folded (and similar) plugins when used inside them
This can be solved by using the inline flag of the include plugin. This mode strips all section from the included page and should solve issues with invalid HTML and thus no longer working wrap and folded plugins. This also solves problems with invalid HTML code when the include plugin is used inside tables or other syntax environments. When the page contains headers this might look strange depending on the template.
Addendum
If you are using the Wrap Plugin on both the page you are using the {{section>target&inline}} from and the page target, you need to make sure any pair of WRAP tags on target are either entirely within the included section or entirely outside of the section. For instance, including the FOO section into another page might break the other page:
<WRAP right 35%> ==== FOO ==== Content goes here </WRAP> ==== BAR ====
FOO contains the </WRAP> end-tag, but not a corresponding start-tag. Thus, if the use of include is within a WRAPed block, that WRAP block will be ended early.
The simplest solution is to never use WRAP on both pages, only on included pages or only on pages that include others – however, that's not very realistic or useful. The other (somewhat brittle) solution is to make the section on target end before the WRAP close tag. You can do this by inserting a dokuwiki section header (at the same level) before the close tag, but after the section's content. However, I've not been able to determine if this is an intended behavior of dokuwiki, or if this is undocumented behavior and therefore subject to change at any time.
So, to make the above example work correctly, it should look like this:
<WRAP right 35%> ==== BAZ ==== Content goes here ==== ==== </WRAP> ==== QUX ====
Now {{section>whatever#BAZ}} will work fine.
Is it possible to include the same page twice?
Yes, this is possible since the 2011-01-01 version and hasn't been possible before. But you can't include the same page again inside a page in order to avoid endless recursion (and things like page1 > page2 > page1 doesn't work, too).
Does the include plugin respect ACLs of the included pages?
The include plugin tries its best to respect ACLs and it should work under normal circumstances. Whenever the view permissions of included pages change the cache is purged and the included pages are adapted according to the current permissions. Due to limitations in the caching system this might fail if a page is accessed very frequently with changing permissions. If this is an issue for you you can disable caching of the affected pages using the ~~NOCACHE~~ syntax. As always there is no guarantee that everything works as expected, please test if everything works and report a bug if you should notice anything unexpected.
As of version 2012-11-24, there is a new security feature called safeindex that is turned on by default, it's purpose is to prevent the indexer from indexing metadata of included pages that aren't public. That way links that are in protected pages won't be visible as link of a public page in the backlinks list.
Why does the include plugin first close the previous section and opens it again afterwards?
This is done because if there are headers in the included page they will close the current section. As the include plugin has its own container div this would produce strange results and possibly invalid HTML. You can use the inline flag in order to avoid this (but then also all sections of the included page are removed).
Has the include plugin feature XYZ/when will you implement XYZ?
The include plugin has many feature and is very flexible and I'm willing to add more features if they fit in the general purpose of the include plugin. However there is no guarantee that I will implement a certain feature at a certain time, this depends completely on my available time and my mood. You can add your wishes to the issue tracker.
How to avoid inclusion of whole page content if section does not exist?
Adding the flag firstsectiononly could be one solution. At least in regard to avoiding very large content being displayed. Adding a header at the source page and using tools like the hiddenheader might solve things at the source page, but in this case seems to conflict and break certain include flag-tasks.
Discussion
Please don't report any bugs or feature requests here but instead use the bug tracker!
If you miss a comment you've created please have a look at the FAQ section and the issue tracker, I might have moved them there, if you can't find a bug report anymore that bug should be solved, please try the current version and report it again if it still doesn't work.
Discussions in DW-forum
- include plugin: development in direction to use it as a kind database tool, feature inspirations.
User comments
footer.php:
// author if ($flags['user']) { $author = $meta['creator']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$author);
replaced to include the real user name in the link:
// author if ($flags['user']) { $author = $meta['creator']; $login = $meta["last_change"]['user']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$login);
User Namespace
Hi, I'm using userpagecreate plugin's to create user's namespace instead of user's page. Then, to link correctly the include's page with his last member who edit it, i rewrite the previous lines like this :
if ($flags['user']) { $login = $meta['last_change']['user']; $author = $auth->getUserData($login); $author = $author['name']; if ($author && $login) { if (strstr($this->getConf('usernamespace'), '@USER@')) { $userpage = cleanID(str_replace('@USER@', $login, $this->getConf('usernamespace'))); } else { $userpage = cleanID($this->getConf('usernamespace').':'.$login); } resolve_pageid(getNS($ID), $userpage, $exists); $class = ($exists ? 'wikilink1' : 'wikilink2'); $link = array( 'url' => wl($userpage), 'title' => $userpage, 'name' => hsc($author), 'target' => $conf['target']['wiki'], 'class' => $class.' url fn', 'pre' => '<span class="vcard author">', 'suf' => '</span>', ); $xhtml[] = $renderer->_formatLink($link); } }
and change my conf into :
$conf['plugin']['include']['usernamespace'] = 'user:@USER@:start';
standard configuration still works.
$conf['plugin']['include']['usernamespace'] = 'user:';
If the @USER@ wildcard is using, replace it by the login name, otherwise, use the standard include's plugin rule.
— garlik 2011/10/24 14:10
— garlik 2011/11/07 11:32 - Summmary : Update the code. will display the right modif author.
showlink vs link flag
When including a page, the flag to make the first heading a link is link, not showlink. This confused me at first because I assumed the flags would have the same names as the configuration options. Example (displays the first section of a product page, with the page heading as a link):
{{page>products:sample&firstseconly&link}}
Controlling header size in included pages
By default, the headers in included pages start one level lower than the last header in the current page. For example, if the section before the include is a level-three header, then a level-6 header in the included page will become a wimply little level-2.
If you want higher-level headers, you can trick the plugin by putting an empty header above the include. In the following example, a level-6 header in the included page will show up as level-5:
=== Some Section ===
Stuff
====== ======
{{page>somepage}}
- Zioth
Including a paragraph or excerpt from a page
See the Hidden Header plugin. -Zioth
2012-01-25 "Angua"
Just tested with the current version and it works for me. — renux 2012/02/10 12:44
Include from same page?
Using it on my knowledge wiki and it works well. However, I'd like to be able to include a section from the current page - for use with the ItemTable Plugin (along with something to hide the inline text of course. — Julian Knight 2012-03-23
Does it still work? Can't make it on my wiki page.
— Piotr 2017-10-04
Align Feature
It'll be great to be able to align included pages. Because a lot of people are using this feature for infobox purposes and some would love to be able to control the alignment of the
{{page>people:obama}}
using the core syntax by adding spaces before of after the syntax.
— James 2014-05-13 20:38
Exclude Feature
It would be nice, if there would be an “exclude” option. When we use the namespace feature, we don't want certain pages in the included in the resulting page: for example exclude “sidebar” or “start”.
— Manuel 2014-10-30 02:42
I would appreciate that feature too.
— Florian 2015-07-18 18:43
Same here, the possibility of the exclusion of listed namespaces would be much appreciated.
— Tommy 2016-2-19 21:18
I totally agree.
—- Chris 2016-2-21 09:12
blog plugin supports Exclude Feature
— HsinTang 2016-07-26
I created a PR for an exclude option! Testing or adding tests would be appreciated.
— sleeping 2020-04-11 07:57
The exclude flag has been merged!
— sleeping 2020-04-16 19:28
Empty Section
We are using the plugin a lot for technical documentation. If we include a named section (#title), and that section doesn't exist, the plugin includes the whole page. This really annoying. Would it be possible to change the behavior so that if a section doesn't exist it doesn't include anything (the same as when a page doesn't exist), please?
— Simon 2015-02-02 14:50
Just thought of asking about this issue. Is there any possibility to avoid that? — Samana Johann 2018-08-20 19:45
No Other data
I love this plugin but I have a question. How do I completely remove all other data included, such as user, mdate, etc.? If I do them as individual flags I still see the grey bar under the included content. There must be a flag that just excludes all the content, right? Am I just missing it somehow?
Thanks!
— Max 2017.03.21
Hi there, I think you are looking for
{{page>ID&nouser&nodate&nofooter}}
Namespace lists using &linkonly and &beforeeach/&aftereach
I've been trying to format a list of pages generated using namespace> with &linkonly - ideally as a simple unordered list. I'm adding this paragraph to help others searching for help because it took me several hours to find out that it is not possible and this is a known issue logged as a feature request.
— vt306 2017.03.29
Thanks to Michael Hamann for the advice. The pagequery plugin is the solution for this.
— vt306 2017.04.06
Option to pass revision of main page to includes pages
We are currently using DokuWiki for technical documentation. Within DokuWiki we use the 'date_at' function to go back to an old revision to see which version of the page a customer recieved. It would be very usefull if the included pages would honour the revision of the main page. To clarify: if the main page is shown at a specific revision, the included pages should also be shown at the last revision before the date of the main page. Would something like that be possible to incorporate?
Thanks in advance! Ruud
Translations
If it is of use, a paticular Translation of the Plugin's info page into German can be taken from here. — Samana Johann 2018-08-20 12:11
Display search results on a page?
Hi, I was wondering if it is possible to display the search result of a term or phrase on a page?
- OYMYO
Passing parameters/arguments
I think it would be cool if this plugin supported options/arguments like in MediaWiki.
Something like this:
- page1.txt
Test by {{{1}}}
- page2.txt
{{page>:page1|Me}}
And page2 would be parsed into:
Test by Me
— hasha2982 2020-08-19 17:12
Sorry, didn't know about the Templater Plugin — hasha2982 2020-08-19 17:25
2026-2-5 19:15:53
Imagelink Plugin
—- plugin —- description: Create nice navigation links with image and title author : peterfromearth email : coder@peterfromearth.de type : syntax lastupdate : 2020-02-29 compatible : depends : conflicts : similar : tags : link image navigation
downloadurl: https://github.com/peterfromearth/dokuwiki-plugin-imagelink/zipball/master bugtracker : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/issues sourcerepo : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/ donationurl:
screenshot_img : https://raw.githubusercontent.com/peterfromearth/dokuwiki-plugin-imagelink/master/example/screenshot.png
Installation
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Examples/Usage
See the plugin in action here.
<imagelink?title=Impressionen>
[[:impressionen|{{ :intro:links:getreide.jpg?linkonly |}}]]
</imagelink>
Syntax
<imagelink?title="TITLE NAME">
[[...|{{...}}]]
</imagelink>
Use image with links see image_links
Configuration and Settings
Development
Change Log
- version 2020-02-29 (2020/03/01 01:59)
- Initial commit (2020/03/01 01:56)
Known Bugs and Issues
ToDo/Wish List
FAQ
Discussion
2026-2-5 19:15:08
Tag Plugin
—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing
downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag
Description
The Tag Plugin lets you assign category tags to wiki pages.
Components
Tag
Add a tag to the page
{{tag>[list of tags]}}
| [list of tags] | a space separated list of tags that describe the content of the current page | required |
|---|
Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.
Examples:
{{tag>tag1 tag2 tag3}}- with namespaces:
{{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}} - multiple word tags:
{{tag>tag1_with_multiple_words tag2 tag3_part}} {{tag>"tag with spaces" tag2}}– Within quotes you can use spaces. Tag is stored internally with underscores_.
Topic
List all pages with given tags.
{{topic>[tag]&[flags]}}
| [tag] | the category tag for which you want a list of pages | required |
|---|---|---|
| [flags] | pagelist flags delimited by &, see flags | optional |
This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:
- If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
+creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the+(AND), so each listed page must have this tag.-removes all pages tagged with the given tag from the list of already found pages (NOT).
Example:
{{topic>tag1 -tag2}}– Lists all pages tagged with tag1 but not with tag2.{{topic>tag1 +tag2}}– Lists all pages tagged with tag1 and tag2.{{topic>tag1 tag2}}– Lists all pages tagged with either tag1 or tag2 or both.{{topic>ns1?tag1 tag2}}– List all pages inside namespace ns1 tagged with either tag1 or tag2{{topic>.?tag1 tag2}}– List all pages inside the current namespace tagged with either tag1 or tag2{{topic>tag1 tag2 tag3&nodate&desc&sort}}(Adding pagelist options to change the design)
Searchtags
Search form for filtering by tag.
{{searchtags&[flags]}}
| [flags] | pagelist flags delimited by &, see flags | optional |
|---|
This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.
This is a great feature which you should not miss. Please add a screenshot of this cool feature.
And you might check out TagFilter Plugin for similar purpose but in different scenarios.
Example:
{{searchtags}}– The basic syntax{{searchtags&nodate&desc&sort}}– with pagelist options to change the design{{searchtags&nonsform}}– hide the namespace selector
Count
Shows a list of tags and its number of occurrences.
{{count>[tag][&namespace]}}
| [tags] | The tag for which you want to list the occurrence. Multiple tags separated by spaces. | optional |
|---|---|---|
| &[namespaces] | Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. | optional |
This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.
Example:
{{count>+}}– List all tags with related occurrences.{{count>tag1 tag2}}– List the occurrence of tag1 and tag2.{{count>tag1 tag2 tag3&. ns1 ns2}}– List all occurrences for the given tags inside the namespaces (the dot.specifies the root namespace){{count>+&ns1 ns2}}– List all tags inns1andns2.
Tagpage
Make link to the tag list
{{tagpage>[tag][&dynamic][|title]}}
This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.
Example:
{{tagpage>test_foo}}– The basic syntax{{tagpage>test_foo&dynamic}}– A link with dynamic link color{{tagpage>test_foo|my title}}– A link with custom title{{tagpage>test_foo&dynamic|my | title}}– A link with dynamic link color and custom title (that can also contain|)
Configuration
The plugin can be configured with the DokuWiki configuration manager available in the admin menu.
namespace | Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag |
|---|---|
sortkey | Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title |
sortorder | Sort order of the topic overview (ascending or descending) |
pagelist_flags | Comma separated Flags of the pagelist plugin which is used to display the topic overview |
toolbar_icon | Show icon in page editor toolbar to add tags. |
list_tags_of_subns | When counting tags in specified namespaces include also tags in subnamespaces. |
tags_list_css | Choose tags list style between standard or optimised for top of page position. |
Tagindex Rebuild
If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.
Demo / Screenshots
Changes
- 2014-02-16
- New and updated translations
- Fixed tag searching with out of date indexes and numbers
- Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
- 2013-04-14
- New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
- Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
- In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
- The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
- Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
- 2013-04-05:
- New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
- Removed the Technorati ping feature as Technorati is no longer using any pings
- zh-tw translation updated
- 2013-02-15:
fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
- 2012-11-25
- New searchtags feature, displays a search form for the topic syntax
- Fix section edit button styles for the new dokuwiki template
- In the topic syntax now really only namespaces and not pages are matched by namespace parameter
- When sorting by the title the case is ignored now
- Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
- 2012-08-24
- The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
- Tags are now normalized in the same way as page ids are normalized
Development changelog:
- Merge pull request #257 from dokuwiki-translate/lang_update_749_17017… (2023/12/06 04:53)
- translation update (2023/12/05 22:20)
- update plugin.info.txt (2023/10/18 04:40)
- Make selector less specific by using .dokuwiki (2023/10/18 04:39)
- Version upped (2023/09/12 05:50)
- Merge pull request #254 from Miro-Collas/master (2023/09/11 23:31)
- Another minor fix (2023/09/11 07:10)
- Miro bugfix (2023/09/11 07:04)
Sites using this Plugin
Feel free to add yours here:
- http://tokeek.de (German)
- Prinz Eisenherz Lexikon (German)
- Psiconauti (Italian)
- Blog Fred Radeff (French)
FAQ
How to use tags which consist of multiple words?
Just use an “_”, it gets automatically replaced by a “ ” i.e.:
{{tag>tag_with_multiple_words}}
Also, quotes seem to work:
{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work
Let's use one of the example websites.
If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess
This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use
RewriteCond %{REQUEST_URI} !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$ tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags
This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.
- action.php
function _handle_keywords(&$data) { global $ID; // Fetch tags for the page; stop proceeding when no tags specified $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER); if(is_null($tags)) return; // Replace underscores with blanks foreach($data->data['meta'] as &$meta) { if($meta['name'] == 'keywords') { $meta['content'] = str_replace('_', ' ', $meta['content']); // add extra styling $t = explode(',', $meta['content']); if(in_array('deprecated', $t)) { $data->data['style'][] = array('type' => 'text/css', '_data' => '.dokuwiki .page {background-color: red;}'); } } } }
Customizing the breadcrumbs
If you add at pagelist/helper.php
function tpl_youarehere2_help($id){ $result = ''; global $conf; global $ID; global $lang; // check if enabled if(!$conf['youarehere']) return false; $parts = explode(':', $id); $count = count($parts); // always print the startpage $result .= html_wikilink(':'.$conf['start']); // print intermediate namespace links $part = ''; for($i=0; $i<$count - 1; $i++){ $part .= $parts[$i].':'; $page = $part; if ($page == $conf['start']) continue; // Skip startpage // output $result .= ' » '.html_wikilink($page); } // print current page, skipping start page, skipping for namespace index resolve_pageid('',$page,$exists); if(isset($page) && $page==$part.$parts[$i]) return $result; $page = $part.$parts[$i]; if($page == $conf['start']) return $result; $result .= ' » '.html_wikilink($page); return $result; } function tpl_youarehere2($id) { $str = $this->tpl_youarehere2_help($id); $pos = strrpos($str , '»'); if ($pos == -1) return $str; return substr($str, 0, $pos); } function addPage2($page) { $id = $page['id']; if (!$id) return false; $this->page = $page; $this->_meta = NULL; // priority and draft if (!isset($this->page['draft'])) { $this->page['draft'] = ($this->_getMeta('type') == 'draft'); } $class = ''; if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' '; if ($this->page['draft']) $class .= 'draft '; if ($this->page['class']) $class .= $this->page['class']; if(!empty($class)) $class = ' class="' . $class . '"'; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->_pageCell($id); if ($this->column['date']) $this->_dateCell(); if ($this->column['user']) $this->_userCell(); if ($this->column['desc']) $this->_descCell(); foreach ($this->plugins as $plug => $col) { if ($this->column[$col]) $this->_pluginCell($plug, $col, $id); } $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">'; $this->doc .= $this->tpl_youarehere2($id); $this->doc .='</td>'.DOKU_LF; $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; return true; }
And change tag/action.php
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage($page); }
to
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage2($page); }
After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.
Bad appearance when displaying tags at top of page
Integrated to main code (see tags_list_css) option
When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:
div.dokuwiki div.tags { border-top: 2px dotted __border__; font-size: 95%; text-align: right; /* clear: both; */ }
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10
You need to add copy of the existing tag pattern, and modify it to
- syntax/tag.php
$this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag'); //e.g. Spanish: $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers
Is there a way to group pages by the first letter of their name or header?
Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list
No.
Collapsible outline of all tags?
My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21
—
I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx
Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.
For bugs or feature requests, there is the bug tracker linked here : Bug tracker.
This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.
If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?
Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
- Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
- Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
- In most of my installation it works, in some not… clueless!
- How to sort the taglist (count>+) alphabetical?
My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02
Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks
Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02
Blank pages
I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(
All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(
I am using Debian Wheezy and I am having the same issue.
»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V
Nothing was found.
Same here, get a Nothing was found page.
(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.
SEO meta keywords
Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00
Sorting the {{count>}} results
Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42
This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan
In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim
Unorderd List of all tags?
Is there a way to gen an unorderd list of all tags, similar as
| Tag | # |
|---|---|
| 临汾文脉 | 1 |
| 霍州文史 | 1 |
| 文史广告 | 1 |
| 隰县 | 1 |
| 乡宁 | 1 |
| 乡宁文史 | 1 |
| 襄汾文史 | 1 |
, but without table and occurrences?
Filtering the list of Tags?
Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.
Add "*" to list all the tags under a tag namespace?
I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use
{{topic> ns1:*}}
to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28
—
Columns?
2024-12-23
Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.
Count Table Columns
2025-05-01
I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.
It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.
Exclude subnamespaces
I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?
2026-2-5 16:38:34
Blog Plugin
—- plugin —-
description: Use DokuWiki as blogging tool
author : Dokufreaks (previous author: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner)
email : freaks@dokuwiki.org
type : syntax, action, helper
lastupdate : 2023-10-24
compatible : Librarian, Kaos, Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum
depends : include, pagelist
conflicts :
similar : blogtng, miniblog
tags : blog, news
downloadurl: https://github.com/dokufreaks/plugin-blog/archive/master.zip
bugtracker : https://github.com/dokufreaks/plugin-blog/issues
sourcerepo : https://github.com/dokufreaks/plugin-blog
Description
The Blog Plugin makes blogs in your wiki easily possible. The blog component shows the latest entries (pages) from a namespace in reverse chronological order. In this new version, the creation date is the sort key – no longer the date of the last non-minor modification as in previous versions. The archive component lists all entries that were written (created) in the given month.
Installation
| Download | plugin-blog.tgz |
|---|---|
| BundleHub | Configure your own DokuWiki blogsuite install package, consisting of all mandatory plugins plus any optional features you want to include: BlogSuite BundleHub Site seems to be down for sime time, here is the archived version if you want to see possible optional plugins & features. |
| Tips | If you intend to use this plugin be sure to take a look at the blogging tips page |
Syntax
Blog
| [namespace] | namespace for the blog; subspaces will be searched as well; * is the whole wiki, . is the same namespace as the page lies in | optional; default is the blog namespace set in the configuration |
|---|---|---|
| [number] | number of entries to show per page | optional; default is 5 |
| [flags] | flags are delimited by & | |
| all Include plugin flags are supported | optional | |
Form placement: topform/bottomform/noform | optional, default is topform |
|
Custom new-entry form title: newentrytitle=Custom title | optional, can also be set as a configuration option | |
Hide paging controls: nopagingcontrols | optional |
This includes a specified number of most recent blog entries from the given namespace into the current page. Below the entries a link to the page (permalink), the author, the creation date and the number of comments are shown. Link, author, date and comments info can be hidden. At the end of the blog a link to older entries lets you navigate in the history of the blog. At the very end, if you have enough rights to create new pages, a form for new blog entries is displayed.
Note that when the page with the blog syntax is in the specified namespace, content my be shown twice. At some point, the loop will be detected and stopped. You should therefore make sure that either the page with the listing is in a different namespace or use the excluded_pages-option to explicitly exclude the blog page from the blog listing.
Archive
| [namespace] | the namespace for which you want an archive list; * is the whole wiki, . is the same namespace as the page lies in | optional; default is the namespace specified in the configuration |
|---|---|---|
| [month] | the month for the archive list in YYYY-MM format; * for all pages | required |
| [flags] | pagelist flags delimited by &, see flags | optional |
| [username] | username of an author | optional |
Shows a table with all pages of the given namespace that were created in the specified month.
Creates an automatic archive.
Configuration and Settings
The blog plugin can be configured using the DokuWiki configuration manager available in the admin menu.
namespace | The default namespace which is used if no namespace was given in the syntax |
|---|---|
formposition | You can choose to display the new entry form either above or below the blog entries |
newentrytitle | Set a custom title for all new entry forms. This can also be set on individual blog forms. |
dateprefix | A date prefix that automatically gets added to pages created with the new entry form. You can use the options from the strftime PHP function; namespace separators work as well, e.g. %Y:%m%d |
sortkey | Defines how the blog entries are sorted. Available options are creation date, modification date, page name, page ID and page title (first headline) |
sortorder | Sort the blog entries ascending/descending |
excluded_pages | Exclude certain pages from the blog listing. Requires a regular expression. Use for example !(^|:)start$! in order to exclude start pages from all blog listings. To exclude both start and rightsidebar directly below :blog use !(^|:)blog:(start|rightsidebar)$! |
showhistogram | Display a histogram in normal archive mode (not for autoarchive) |
max_months | Maximum number of months to show in the histogram |
histogram_height | Height of the histogram (in pixels) |
Changes
* 2013-10-20: Translation updates, fix cache handling for empty blog listings
* 2013-03-27: Better cache handling for the archive syntax
- the syntax that lists everything till now correctly updates the cache now whenever a page is changed or a comment or linkback is added.
- the cache is not used anymore when it contains an archive listing with a page that the current user can't access. The excluded pages won't be included again automatically unless the cache expires for other reasons, the
~~NOCACHE~~macro can be used if this is needed.
Development
Change Log
- Merge pull request #126 from dokuwiki-translate/lang_update_848_17143… (2024/05/01 23:45)
- translation update (2024/04/29 14:20)
- Version upped (2023/10/25 05:50)
- Merge pull request #121 from fiwswe/fix_issue_120 (2023/10/25 01:51)
- Rename constructor (2023/10/24 18:10)
- Merge pull request #118 from dokuwiki-translate/lang_update_564_16764… (2023/02/17 03:25)
- translation update (2023/02/15 08:35)
- Merge pull request #117 from dokuwiki-translate/lang_update_551_16745… (2023/01/25 04:45)
Bugs / Feature Requests
Please report bugs or feature requests at the Bug tracker.
FAQ
Please also have a look at the blogging tips page!
My dates are shown wrong. What can I do?
Make sure you run the latest version of all required plugins and DokuWiki.
Is it possible to change the way the date is displayed?
Yes, the plugin uses the dformat option to format the date.
How can I alter the date of a blog post?
You can use the meta plugin to manually set the creation date (and modification date) in the page source, then select the modification date in the blog plugins order setting. An alternative solution would be to alter the timestamps of the created files.
Is it possible to show table of contents?
The table of contents is shown automatically (depending on the settings in DokuWiki itself) from version 2013-02-07 on.
The header is always a link to the page even though it's disabled in the include plugin settings
The blog plugin assumes that in the context of a blog the header should be a link. However from version 2013-02-26 on it is possible to disable this behavior by using the nolink-flag, the blog plugin now only sets a default without overriding the nolink flag.
Is it possible to show just the first lines of each post with a 'Read more' link to view the full post?
I think I solved myself.
In the blog mark, use the following flags
This will work if you add an H2 header (in the full post) where you want to make appear the 'Read more' link.
If you don't need or want an H2 header in your post, you can add a empty H2 header, just as a delimiter for the text you want to show in the Blog's headlines
the excluded_pages does not work
In the blog mark ,use the following flags
Include Plugin
—- plugin —- description: Include another wiki page into the current one author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, helper lastupdate : 2025-07-22 updatemessage: Since the release of June 2025, minimal PHP 8 is required. compatible : Greebo, Frusterick Manners, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : conflicts : mediasyntax, PhotoGallery similar : wst tags : include, embed
downloadurl: https://github.com/dokufreaks/plugin-include/tarball/master bugtracker : https://github.com/dokufreaks/plugin-include/issues sourcerepo : https://github.com/dokufreaks/plugin-include/ donationurl:
The 2018-11-29 release fixes a security issue where ACLs were ignored for pages in namespace includes with DokuWiki version Greebo. If you rely on ACL checks in namespace includes or allow edits from users who must not see all pages, please upgrade ASAP!
This is a handy plugin with which you can include another wiki page into the current one. Just including certain sections of a page or even whole namespaces is supported, too.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
If you need support for older version of DokuWiki you can try the 2009-11-27 version of the include plugin, but please note that this old version has known bugs. If you need support for older versions of DokuWiki in the current include plugin version please open a feature request in the issue tracker.
Examples
{{page>wiki:syntax#Tables}} will include the section about tables of the syntax page.
{{namespace>project_foo}} will include all pages in the project_foo namespace.
{{page>blog:mypage&tags&comments}} will include the page blog:mypage and show the tags from the tag plugin and the number of comments from the discussion plugin. Both plugins need to be installed for this example.
{{tagtopic>testtag}} will include all pages with the tag testtag, the tag plugin needs to be installed for this example.
Syntax
The plugin offers four syntaxes, {{page>...}} , {{section>...}} , {{namespace>...}} and {{tagtopic>...}}.
Section is aimed more at including sections, page at including whole pages and namespace at including whole namespaces. Tagtopic includes all pages with a tagtopic tag.
{{page>[id]&[flags]}}
{{section>[id]#[section]&[flags]}}
{{namespace>[namespace]#[section]&[flags]}}
{{tagtopic>[tag]&[flags]}}
| [id] | page ID of the page to include; some macros are possible; shortcuts are resolved (:, ., ..) | required |
|---|---|---|
| [section] | limits the included page to a specific section and its subsections | optional; default is the whole page , this can be used with namespace (if matches) |
| [tag] | include pages with tag topic tag, requires tag | required |
| [flags] | flags delimited by &, see flags | optional |
Configuration and Flags
The plugin can be configured in the DokuWiki configuration manager available in the admin menu. These settings also affect the blog plugin which uses the include plugin to generate the blog page. For most settings there are flags that allow to override the setting. Some features are only available as flag.
| Configuration option | Flags | Description |
|---|---|---|
noheader | noheader/ (show)header | Don't display the header of the inserted section |
firstseconly | firstsec(tion)only/ fullpage | Display only the first section of the included page |
readmore | readmore/noreadmore | Show “read more” link in case of firstsection only |
showtaglogos | - | Show/hide an image for the first tag (if the page has tags) |
showfooter | footer/nofooter | Show/hide page footer below the included page |
showlink | link/nolink | Makes the first headline of a included page/section a link to the included page/section |
showpermalink | permalink/ nopermalink | Show/hide a permalink to the included page in the page footer |
showdate | date/nodate | Show/hide creation date of the page in the page footer |
showmdate | mdate/nomdate | Show/hide modification date of the page in the page footer |
showuser | user/nouser | Show/hide user name of the page creator in the page footer |
showcomments | comments/nocomments | Show/hide number of comments in the page footer (requires the discussion plugin) |
showlinkbacks | linkbacks/nolinkbacks | Show/hide number of linkbacks in the page footer (requires the linkback or backlinks plugin) |
showtags | tags/notags | Show/hide tags in the page footer (requires the tag plugin) |
showeditbtn | editbtn or editbutton/noeditbtn or noeditbutton | Show/hide edit buttons (section edit buttons, edit button below the included page) |
doredirect | redirect/noredirect | Redirect back to original page after an edit |
usernamespace | - | Namespace for user pages (see showuser configuration) (default user) |
doindent | indent/noindent | Indent included pages relative to the section of the page they get included in |
linkonly | linkonly/nolinkonly or include_content | Display only a link instead of the whole page content |
title | title/notitle | Show the title instead of the page id |
pageexists | pageexists/ nopageexists | Only list page ids of existing pages (see existlink) |
| - | existlink | Display a link and do so only if page page-id exists (combination of linkonly and pageexists) |
parlink | parlink/noparlink | (Don't) put the link into a paragraph environment (for inline lists) |
order | order=OPTION | Ordering criteria for namespace includes, possible options: page ID (id), title (title), date created (created), date modified (modified), indexmenu sort order (indexmenu), custom sort order using the {{include_n>[number]}} on the pages that are included similar to the indexmenu tags (custom). |
rsort | rsort/sort | Reverse the sort order in namespace includes. |
depth | depth=DEPTH | The maximum depth of subnamespaces of which pages are included in namespace includes, default is 1 for only the specified namespace, 0 is for unlimited depth. |
| - | inline | Don't close/open sections when including a page. This flag should be used when the include syntax is used inside other syntax elements like lists or tables or inside other plugin syntax. |
| - | beforeeach=ENTITY/ aftereach=ENTITY | Display an entity before/after each included page. The entity is printed outside the section/include environment, this is mainly for adding custom HTML code (when the text isn't recognized as entity it is directly displayed but escaped so you can't directly use HTML code here). |
safeindex | - | Don't index metadata of included pages that are non-public. This can cause problems with other plugins that use the metadata index and can be safely disabled in wikis where the permissions of the included pages match the permissions of the parent pages. |
| - | exclude=/REGEX/ | Regular expression to exclude certain pages, will match on full page ID. E.g. to exclude ns:page_name use /ns:page_name/ as value. Use a regex tester to debug complicated patterns. |
Examples:
{{page>concept&firstseconly&footer}}
{{page>mypage&noindent}}
{{namespace>myns&order=modified}}
{{namespace>myns&exclude=/myns:subns:.+|myns:page/}}
Macros
Simple macros are possible to serve a page on a per user or per date base. These are:
| @USER@ | username |
|---|---|
| @NAME@ | full name of user |
| @GROUP@ | first group the user belongs to |
| @YEAR@ | 4-digit year |
| @MONTH@ | 2-digit month |
| @WEEK@ | 2-digit ISO week number |
| @DAY@ | 2-digit day |
| @DATE<expr>@ | use a calculated date instead of today in date macros |
<expr> in @DATE<expr>@ can be one of:
| PYEAR | previous year |
|---|---|
| NYEAR | next year |
| PMONTH | previous month |
| NMONTH | next month |
| PWEEK | previous week |
| NWEEK | next week |
| YESTERDAY | yesterday's date |
| TOMORROW | tomorrow's date |
Examples:
{{page>@MONTH@:@DAY@:birthdays}}
includes the page birthdays in namespace <month>:<day>: eg. 10:15: birthdays for the 15th of october.
{{page>@USER@:message}}
includes the page message from the namespace <user> of the logged in user
{{page>foo@DATENWEEK@@YEAR@:@WEEK@}}
includes the page <weekno> from the namespace foo<year> with next week's date e.g. foo2012:01 for the 27th of december 2011
Demo
There is currently no demo site available.
Use of the plugin is shown in this video here: https://www.youtube.com/watch?v=6RO8TSZBedU&t=8m47s
Video not available (2021-03-20)
Development
Change Log
- Version upped (2025/07/23 07:04)
- fix tag for minimum php version (2025/07/23 03:38)
- Version upped (2025/07/05 07:04)
- Merge pull request #363 from dokufreaks/tests (2025/07/05 01:49)
- replace strftime use with dformat (2025/07/04 23:20)
- use newer DokuWiki test workflow (2025/07/04 23:15)
- Merge pull request #360 from dokuwiki-translate/lang_update_1151_1748… (2025/07/04 23:10)
- add minimum php requirement to plugin.info.txt (2025/07/04 23:05)
Bugs / Feature Requests
Please report bugs or feature requests at the Bug tracker.
Known Bugs and Issues
There are currently no known bugs and issues for which no workarounds exist (see FAQ).
FAQ
The include plugin breaks the wrap and folded (and similar) plugins when used inside them
This can be solved by using the inline flag of the include plugin. This mode strips all section from the included page and should solve issues with invalid HTML and thus no longer working wrap and folded plugins. This also solves problems with invalid HTML code when the include plugin is used inside tables or other syntax environments. When the page contains headers this might look strange depending on the template.
Addendum
If you are using the Wrap Plugin on both the page you are using the {{section>target&inline}} from and the page target, you need to make sure any pair of WRAP tags on target are either entirely within the included section or entirely outside of the section. For instance, including the FOO section into another page might break the other page:
<WRAP right 35%> ==== FOO ==== Content goes here </WRAP> ==== BAR ====
FOO contains the </WRAP> end-tag, but not a corresponding start-tag. Thus, if the use of include is within a WRAPed block, that WRAP block will be ended early.
The simplest solution is to never use WRAP on both pages, only on included pages or only on pages that include others – however, that's not very realistic or useful. The other (somewhat brittle) solution is to make the section on target end before the WRAP close tag. You can do this by inserting a dokuwiki section header (at the same level) before the close tag, but after the section's content. However, I've not been able to determine if this is an intended behavior of dokuwiki, or if this is undocumented behavior and therefore subject to change at any time.
So, to make the above example work correctly, it should look like this:
<WRAP right 35%> ==== BAZ ==== Content goes here ==== ==== </WRAP> ==== QUX ====
Now {{section>whatever#BAZ}} will work fine.
Is it possible to include the same page twice?
Yes, this is possible since the 2011-01-01 version and hasn't been possible before. But you can't include the same page again inside a page in order to avoid endless recursion (and things like page1 > page2 > page1 doesn't work, too).
Does the include plugin respect ACLs of the included pages?
The include plugin tries its best to respect ACLs and it should work under normal circumstances. Whenever the view permissions of included pages change the cache is purged and the included pages are adapted according to the current permissions. Due to limitations in the caching system this might fail if a page is accessed very frequently with changing permissions. If this is an issue for you you can disable caching of the affected pages using the ~~NOCACHE~~ syntax. As always there is no guarantee that everything works as expected, please test if everything works and report a bug if you should notice anything unexpected.
As of version 2012-11-24, there is a new security feature called safeindex that is turned on by default, it's purpose is to prevent the indexer from indexing metadata of included pages that aren't public. That way links that are in protected pages won't be visible as link of a public page in the backlinks list.
Why does the include plugin first close the previous section and opens it again afterwards?
This is done because if there are headers in the included page they will close the current section. As the include plugin has its own container div this would produce strange results and possibly invalid HTML. You can use the inline flag in order to avoid this (but then also all sections of the included page are removed).
Has the include plugin feature XYZ/when will you implement XYZ?
The include plugin has many feature and is very flexible and I'm willing to add more features if they fit in the general purpose of the include plugin. However there is no guarantee that I will implement a certain feature at a certain time, this depends completely on my available time and my mood. You can add your wishes to the issue tracker.
How to avoid inclusion of whole page content if section does not exist?
Adding the flag firstsectiononly could be one solution. At least in regard to avoiding very large content being displayed. Adding a header at the source page and using tools like the hiddenheader might solve things at the source page, but in this case seems to conflict and break certain include flag-tasks.
Discussion
Please don't report any bugs or feature requests here but instead use the bug tracker!
If you miss a comment you've created please have a look at the FAQ section and the issue tracker, I might have moved them there, if you can't find a bug report anymore that bug should be solved, please try the current version and report it again if it still doesn't work.
Discussions in DW-forum
- include plugin: development in direction to use it as a kind database tool, feature inspirations.
User comments
footer.php:
// author if ($flags['user']) { $author = $meta['creator']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$author);
replaced to include the real user name in the link:
// author if ($flags['user']) { $author = $meta['creator']; $login = $meta["last_change"]['user']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$login);
User Namespace
Hi, I'm using userpagecreate plugin's to create user's namespace instead of user's page. Then, to link correctly the include's page with his last member who edit it, i rewrite the previous lines like this :
if ($flags['user']) { $login = $meta['last_change']['user']; $author = $auth->getUserData($login); $author = $author['name']; if ($author && $login) { if (strstr($this->getConf('usernamespace'), '@USER@')) { $userpage = cleanID(str_replace('@USER@', $login, $this->getConf('usernamespace'))); } else { $userpage = cleanID($this->getConf('usernamespace').':'.$login); } resolve_pageid(getNS($ID), $userpage, $exists); $class = ($exists ? 'wikilink1' : 'wikilink2'); $link = array( 'url' => wl($userpage), 'title' => $userpage, 'name' => hsc($author), 'target' => $conf['target']['wiki'], 'class' => $class.' url fn', 'pre' => '<span class="vcard author">', 'suf' => '</span>', ); $xhtml[] = $renderer->_formatLink($link); } }
and change my conf into :
$conf['plugin']['include']['usernamespace'] = 'user:@USER@:start';
standard configuration still works.
$conf['plugin']['include']['usernamespace'] = 'user:';
If the @USER@ wildcard is using, replace it by the login name, otherwise, use the standard include's plugin rule.
— garlik 2011/10/24 14:10
— garlik 2011/11/07 11:32 - Summmary : Update the code. will display the right modif author.
showlink vs link flag
When including a page, the flag to make the first heading a link is link, not showlink. This confused me at first because I assumed the flags would have the same names as the configuration options. Example (displays the first section of a product page, with the page heading as a link):
{{page>products:sample&firstseconly&link}}
Controlling header size in included pages
By default, the headers in included pages start one level lower than the last header in the current page. For example, if the section before the include is a level-three header, then a level-6 header in the included page will become a wimply little level-2.
If you want higher-level headers, you can trick the plugin by putting an empty header above the include. In the following example, a level-6 header in the included page will show up as level-5:
=== Some Section ===
Stuff
====== ======
{{page>somepage}}
- Zioth
Including a paragraph or excerpt from a page
See the Hidden Header plugin. -Zioth
2012-01-25 "Angua"
Just tested with the current version and it works for me. — renux 2012/02/10 12:44
Include from same page?
Using it on my knowledge wiki and it works well. However, I'd like to be able to include a section from the current page - for use with the ItemTable Plugin (along with something to hide the inline text of course. — Julian Knight 2012-03-23
Does it still work? Can't make it on my wiki page.
— Piotr 2017-10-04
Align Feature
It'll be great to be able to align included pages. Because a lot of people are using this feature for infobox purposes and some would love to be able to control the alignment of the
{{page>people:obama}}
using the core syntax by adding spaces before of after the syntax.
— James 2014-05-13 20:38
Exclude Feature
It would be nice, if there would be an “exclude” option. When we use the namespace feature, we don't want certain pages in the included in the resulting page: for example exclude “sidebar” or “start”.
— Manuel 2014-10-30 02:42
I would appreciate that feature too.
— Florian 2015-07-18 18:43
Same here, the possibility of the exclusion of listed namespaces would be much appreciated.
— Tommy 2016-2-19 21:18
I totally agree.
—- Chris 2016-2-21 09:12
blog plugin supports Exclude Feature
— HsinTang 2016-07-26
I created a PR for an exclude option! Testing or adding tests would be appreciated.
— sleeping 2020-04-11 07:57
The exclude flag has been merged!
— sleeping 2020-04-16 19:28
Empty Section
We are using the plugin a lot for technical documentation. If we include a named section (#title), and that section doesn't exist, the plugin includes the whole page. This really annoying. Would it be possible to change the behavior so that if a section doesn't exist it doesn't include anything (the same as when a page doesn't exist), please?
— Simon 2015-02-02 14:50
Just thought of asking about this issue. Is there any possibility to avoid that? — Samana Johann 2018-08-20 19:45
No Other data
I love this plugin but I have a question. How do I completely remove all other data included, such as user, mdate, etc.? If I do them as individual flags I still see the grey bar under the included content. There must be a flag that just excludes all the content, right? Am I just missing it somehow?
Thanks!
— Max 2017.03.21
Hi there, I think you are looking for
{{page>ID&nouser&nodate&nofooter}}
Namespace lists using &linkonly and &beforeeach/&aftereach
I've been trying to format a list of pages generated using namespace> with &linkonly - ideally as a simple unordered list. I'm adding this paragraph to help others searching for help because it took me several hours to find out that it is not possible and this is a known issue logged as a feature request.
— vt306 2017.03.29
Thanks to Michael Hamann for the advice. The pagequery plugin is the solution for this.
— vt306 2017.04.06
Option to pass revision of main page to includes pages
We are currently using DokuWiki for technical documentation. Within DokuWiki we use the 'date_at' function to go back to an old revision to see which version of the page a customer recieved. It would be very usefull if the included pages would honour the revision of the main page. To clarify: if the main page is shown at a specific revision, the included pages should also be shown at the last revision before the date of the main page. Would something like that be possible to incorporate?
Thanks in advance! Ruud
Translations
If it is of use, a paticular Translation of the Plugin's info page into German can be taken from here. — Samana Johann 2018-08-20 12:11
Display search results on a page?
Hi, I was wondering if it is possible to display the search result of a term or phrase on a page?
- OYMYO
Passing parameters/arguments
I think it would be cool if this plugin supported options/arguments like in MediaWiki.
Something like this:
- page1.txt
Test by {{{1}}}
- page2.txt
{{page>:page1|Me}}
And page2 would be parsed into:
Test by Me
— hasha2982 2020-08-19 17:12
Sorry, didn't know about the Templater Plugin — hasha2982 2020-08-19 17:25
2026-2-5 19:15:53
Imagelink Plugin
—- plugin —- description: Create nice navigation links with image and title author : peterfromearth email : coder@peterfromearth.de type : syntax lastupdate : 2020-02-29 compatible : depends : conflicts : similar : tags : link image navigation
downloadurl: https://github.com/peterfromearth/dokuwiki-plugin-imagelink/zipball/master bugtracker : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/issues sourcerepo : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/ donationurl:
screenshot_img : https://raw.githubusercontent.com/peterfromearth/dokuwiki-plugin-imagelink/master/example/screenshot.png
Installation
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Examples/Usage
See the plugin in action here.
<imagelink?title=Impressionen>
[[:impressionen|{{ :intro:links:getreide.jpg?linkonly |}}]]
</imagelink>
Syntax
<imagelink?title="TITLE NAME">
[[...|{{...}}]]
</imagelink>
Use image with links see image_links
Configuration and Settings
Development
Change Log
- version 2020-02-29 (2020/03/01 01:59)
- Initial commit (2020/03/01 01:56)
Known Bugs and Issues
ToDo/Wish List
FAQ
Discussion
2026-2-5 19:15:08
Tag Plugin
—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing
downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag
Description
The Tag Plugin lets you assign category tags to wiki pages.
Components
Tag
Add a tag to the page
{{tag>[list of tags]}}
| [list of tags] | a space separated list of tags that describe the content of the current page | required |
|---|
Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.
Examples:
{{tag>tag1 tag2 tag3}}- with namespaces:
{{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}} - multiple word tags:
{{tag>tag1_with_multiple_words tag2 tag3_part}} {{tag>"tag with spaces" tag2}}– Within quotes you can use spaces. Tag is stored internally with underscores_.
Topic
List all pages with given tags.
{{topic>[tag]&[flags]}}
| [tag] | the category tag for which you want a list of pages | required |
|---|---|---|
| [flags] | pagelist flags delimited by &, see flags | optional |
This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:
- If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
+creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the+(AND), so each listed page must have this tag.-removes all pages tagged with the given tag from the list of already found pages (NOT).
Example:
{{topic>tag1 -tag2}}– Lists all pages tagged with tag1 but not with tag2.{{topic>tag1 +tag2}}– Lists all pages tagged with tag1 and tag2.{{topic>tag1 tag2}}– Lists all pages tagged with either tag1 or tag2 or both.{{topic>ns1?tag1 tag2}}– List all pages inside namespace ns1 tagged with either tag1 or tag2{{topic>.?tag1 tag2}}– List all pages inside the current namespace tagged with either tag1 or tag2{{topic>tag1 tag2 tag3&nodate&desc&sort}}(Adding pagelist options to change the design)
Searchtags
Search form for filtering by tag.
{{searchtags&[flags]}}
| [flags] | pagelist flags delimited by &, see flags | optional |
|---|
This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.
This is a great feature which you should not miss. Please add a screenshot of this cool feature.
And you might check out TagFilter Plugin for similar purpose but in different scenarios.
Example:
{{searchtags}}– The basic syntax{{searchtags&nodate&desc&sort}}– with pagelist options to change the design{{searchtags&nonsform}}– hide the namespace selector
Count
Shows a list of tags and its number of occurrences.
{{count>[tag][&namespace]}}
| [tags] | The tag for which you want to list the occurrence. Multiple tags separated by spaces. | optional |
|---|---|---|
| &[namespaces] | Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. | optional |
This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.
Example:
{{count>+}}– List all tags with related occurrences.{{count>tag1 tag2}}– List the occurrence of tag1 and tag2.{{count>tag1 tag2 tag3&. ns1 ns2}}– List all occurrences for the given tags inside the namespaces (the dot.specifies the root namespace){{count>+&ns1 ns2}}– List all tags inns1andns2.
Tagpage
Make link to the tag list
{{tagpage>[tag][&dynamic][|title]}}
This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.
Example:
{{tagpage>test_foo}}– The basic syntax{{tagpage>test_foo&dynamic}}– A link with dynamic link color{{tagpage>test_foo|my title}}– A link with custom title{{tagpage>test_foo&dynamic|my | title}}– A link with dynamic link color and custom title (that can also contain|)
Configuration
The plugin can be configured with the DokuWiki configuration manager available in the admin menu.
namespace | Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag |
|---|---|
sortkey | Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title |
sortorder | Sort order of the topic overview (ascending or descending) |
pagelist_flags | Comma separated Flags of the pagelist plugin which is used to display the topic overview |
toolbar_icon | Show icon in page editor toolbar to add tags. |
list_tags_of_subns | When counting tags in specified namespaces include also tags in subnamespaces. |
tags_list_css | Choose tags list style between standard or optimised for top of page position. |
Tagindex Rebuild
If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.
Demo / Screenshots
Changes
- 2014-02-16
- New and updated translations
- Fixed tag searching with out of date indexes and numbers
- Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
- 2013-04-14
- New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
- Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
- In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
- The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
- Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
- 2013-04-05:
- New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
- Removed the Technorati ping feature as Technorati is no longer using any pings
- zh-tw translation updated
- 2013-02-15:
fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
- 2012-11-25
- New searchtags feature, displays a search form for the topic syntax
- Fix section edit button styles for the new dokuwiki template
- In the topic syntax now really only namespaces and not pages are matched by namespace parameter
- When sorting by the title the case is ignored now
- Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
- 2012-08-24
- The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
- Tags are now normalized in the same way as page ids are normalized
Development changelog:
- Merge pull request #257 from dokuwiki-translate/lang_update_749_17017… (2023/12/06 04:53)
- translation update (2023/12/05 22:20)
- update plugin.info.txt (2023/10/18 04:40)
- Make selector less specific by using .dokuwiki (2023/10/18 04:39)
- Version upped (2023/09/12 05:50)
- Merge pull request #254 from Miro-Collas/master (2023/09/11 23:31)
- Another minor fix (2023/09/11 07:10)
- Miro bugfix (2023/09/11 07:04)
Sites using this Plugin
Feel free to add yours here:
- http://tokeek.de (German)
- Prinz Eisenherz Lexikon (German)
- Psiconauti (Italian)
- Blog Fred Radeff (French)
FAQ
How to use tags which consist of multiple words?
Just use an “_”, it gets automatically replaced by a “ ” i.e.:
{{tag>tag_with_multiple_words}}
Also, quotes seem to work:
{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work
Let's use one of the example websites.
If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess
This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use
RewriteCond %{REQUEST_URI} !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$ tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags
This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.
- action.php
function _handle_keywords(&$data) { global $ID; // Fetch tags for the page; stop proceeding when no tags specified $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER); if(is_null($tags)) return; // Replace underscores with blanks foreach($data->data['meta'] as &$meta) { if($meta['name'] == 'keywords') { $meta['content'] = str_replace('_', ' ', $meta['content']); // add extra styling $t = explode(',', $meta['content']); if(in_array('deprecated', $t)) { $data->data['style'][] = array('type' => 'text/css', '_data' => '.dokuwiki .page {background-color: red;}'); } } } }
Customizing the breadcrumbs
If you add at pagelist/helper.php
function tpl_youarehere2_help($id){ $result = ''; global $conf; global $ID; global $lang; // check if enabled if(!$conf['youarehere']) return false; $parts = explode(':', $id); $count = count($parts); // always print the startpage $result .= html_wikilink(':'.$conf['start']); // print intermediate namespace links $part = ''; for($i=0; $i<$count - 1; $i++){ $part .= $parts[$i].':'; $page = $part; if ($page == $conf['start']) continue; // Skip startpage // output $result .= ' » '.html_wikilink($page); } // print current page, skipping start page, skipping for namespace index resolve_pageid('',$page,$exists); if(isset($page) && $page==$part.$parts[$i]) return $result; $page = $part.$parts[$i]; if($page == $conf['start']) return $result; $result .= ' » '.html_wikilink($page); return $result; } function tpl_youarehere2($id) { $str = $this->tpl_youarehere2_help($id); $pos = strrpos($str , '»'); if ($pos == -1) return $str; return substr($str, 0, $pos); } function addPage2($page) { $id = $page['id']; if (!$id) return false; $this->page = $page; $this->_meta = NULL; // priority and draft if (!isset($this->page['draft'])) { $this->page['draft'] = ($this->_getMeta('type') == 'draft'); } $class = ''; if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' '; if ($this->page['draft']) $class .= 'draft '; if ($this->page['class']) $class .= $this->page['class']; if(!empty($class)) $class = ' class="' . $class . '"'; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->_pageCell($id); if ($this->column['date']) $this->_dateCell(); if ($this->column['user']) $this->_userCell(); if ($this->column['desc']) $this->_descCell(); foreach ($this->plugins as $plug => $col) { if ($this->column[$col]) $this->_pluginCell($plug, $col, $id); } $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">'; $this->doc .= $this->tpl_youarehere2($id); $this->doc .='</td>'.DOKU_LF; $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; return true; }
And change tag/action.php
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage($page); }
to
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage2($page); }
After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.
Bad appearance when displaying tags at top of page
Integrated to main code (see tags_list_css) option
When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:
div.dokuwiki div.tags { border-top: 2px dotted __border__; font-size: 95%; text-align: right; /* clear: both; */ }
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10
You need to add copy of the existing tag pattern, and modify it to
- syntax/tag.php
$this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag'); //e.g. Spanish: $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers
Is there a way to group pages by the first letter of their name or header?
Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list
No.
Collapsible outline of all tags?
My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21
—
I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx
Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.
For bugs or feature requests, there is the bug tracker linked here : Bug tracker.
This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.
If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?
Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
- Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
- Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
- In most of my installation it works, in some not… clueless!
- How to sort the taglist (count>+) alphabetical?
My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02
Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks
Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02
Blank pages
I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(
All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(
I am using Debian Wheezy and I am having the same issue.
»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V
Nothing was found.
Same here, get a Nothing was found page.
(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.
SEO meta keywords
Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00
Sorting the {{count>}} results
Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42
This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan
In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim
Unorderd List of all tags?
Is there a way to gen an unorderd list of all tags, similar as
| Tag | # |
|---|---|
| 临汾文脉 | 1 |
| 霍州文史 | 1 |
| 文史广告 | 1 |
| 隰县 | 1 |
| 乡宁 | 1 |
| 乡宁文史 | 1 |
| 襄汾文史 | 1 |
, but without table and occurrences?
Filtering the list of Tags?
Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.
Add "*" to list all the tags under a tag namespace?
I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use
{{topic> ns1:*}}
to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28
—
Columns?
2024-12-23
Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.
Count Table Columns
2025-05-01
I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.
It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.
Exclude subnamespaces
I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?
2026-2-5 16:38:34
====== Add New Page Plugin
Compatible with DokuWiki
2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection
Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere
Tagged with button, create, form
Needed for autoincludeindex
By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).
The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.
The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.
The form submit button is disabled if there is no text in the title field.
Edit
Usage
Put
anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.
Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.
with configuration option “Hide namespace selection” enabled.
with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:
Or, to specify a namespace:
Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).
Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,
will create a new namespace within the foo namespace.
Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification
When used together with the autopage option to hide the input field, a daily page can be created with a single button click:
Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.
General syntax:
?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:
overwrite the default hide setting
custom namespace exclusion and hide root
disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub
Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option
Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.
Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:
Use the newtpl template
Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one
The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.
Edit
Multiple occurences
The
syntax may be added multiple times on the same page.
Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:
<?php echo p_render('xhtml',p_get_instructions('
'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.
Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:
Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?
This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?
Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?
Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development
2026-2-5 15:54:19
Include Plugin
—- plugin —- description: Include another wiki page into the current one author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, helper lastupdate : 2025-07-22 updatemessage: Since the release of June 2025, minimal PHP 8 is required. compatible : Greebo, Frusterick Manners, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : conflicts : mediasyntax, PhotoGallery similar : wst tags : include, embed
downloadurl: https://github.com/dokufreaks/plugin-include/tarball/master bugtracker : https://github.com/dokufreaks/plugin-include/issues sourcerepo : https://github.com/dokufreaks/plugin-include/ donationurl:
The 2018-11-29 release fixes a security issue where ACLs were ignored for pages in namespace includes with DokuWiki version Greebo. If you rely on ACL checks in namespace includes or allow edits from users who must not see all pages, please upgrade ASAP!
This is a handy plugin with which you can include another wiki page into the current one. Just including certain sections of a page or even whole namespaces is supported, too.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
If you need support for older version of DokuWiki you can try the 2009-11-27 version of the include plugin, but please note that this old version has known bugs. If you need support for older versions of DokuWiki in the current include plugin version please open a feature request in the issue tracker.
Examples
{{page>wiki:syntax#Tables}} will include the section about tables of the syntax page.
{{namespace>project_foo}} will include all pages in the project_foo namespace.
{{page>blog:mypage&tags&comments}} will include the page blog:mypage and show the tags from the tag plugin and the number of comments from the discussion plugin. Both plugins need to be installed for this example.
{{tagtopic>testtag}} will include all pages with the tag testtag, the tag plugin needs to be installed for this example.
Syntax
The plugin offers four syntaxes, {{page>...}} , {{section>...}} , {{namespace>...}} and {{tagtopic>...}}.
Section is aimed more at including sections, page at including whole pages and namespace at including whole namespaces. Tagtopic includes all pages with a tagtopic tag.
{{page>[id]&[flags]}}
{{section>[id]#[section]&[flags]}}
{{namespace>[namespace]#[section]&[flags]}}
{{tagtopic>[tag]&[flags]}}
| [id] | page ID of the page to include; some macros are possible; shortcuts are resolved (:, ., ..) | required |
|---|---|---|
| [section] | limits the included page to a specific section and its subsections | optional; default is the whole page , this can be used with namespace (if matches) |
| [tag] | include pages with tag topic tag, requires tag | required |
| [flags] | flags delimited by &, see flags | optional |
Configuration and Flags
The plugin can be configured in the DokuWiki configuration manager available in the admin menu. These settings also affect the blog plugin which uses the include plugin to generate the blog page. For most settings there are flags that allow to override the setting. Some features are only available as flag.
| Configuration option | Flags | Description |
|---|---|---|
noheader | noheader/ (show)header | Don't display the header of the inserted section |
firstseconly | firstsec(tion)only/ fullpage | Display only the first section of the included page |
readmore | readmore/noreadmore | Show “read more” link in case of firstsection only |
showtaglogos | - | Show/hide an image for the first tag (if the page has tags) |
showfooter | footer/nofooter | Show/hide page footer below the included page |
showlink | link/nolink | Makes the first headline of a included page/section a link to the included page/section |
showpermalink | permalink/ nopermalink | Show/hide a permalink to the included page in the page footer |
showdate | date/nodate | Show/hide creation date of the page in the page footer |
showmdate | mdate/nomdate | Show/hide modification date of the page in the page footer |
showuser | user/nouser | Show/hide user name of the page creator in the page footer |
showcomments | comments/nocomments | Show/hide number of comments in the page footer (requires the discussion plugin) |
showlinkbacks | linkbacks/nolinkbacks | Show/hide number of linkbacks in the page footer (requires the linkback or backlinks plugin) |
showtags | tags/notags | Show/hide tags in the page footer (requires the tag plugin) |
showeditbtn | editbtn or editbutton/noeditbtn or noeditbutton | Show/hide edit buttons (section edit buttons, edit button below the included page) |
doredirect | redirect/noredirect | Redirect back to original page after an edit |
usernamespace | - | Namespace for user pages (see showuser configuration) (default user) |
doindent | indent/noindent | Indent included pages relative to the section of the page they get included in |
linkonly | linkonly/nolinkonly or include_content | Display only a link instead of the whole page content |
title | title/notitle | Show the title instead of the page id |
pageexists | pageexists/ nopageexists | Only list page ids of existing pages (see existlink) |
| - | existlink | Display a link and do so only if page page-id exists (combination of linkonly and pageexists) |
parlink | parlink/noparlink | (Don't) put the link into a paragraph environment (for inline lists) |
order | order=OPTION | Ordering criteria for namespace includes, possible options: page ID (id), title (title), date created (created), date modified (modified), indexmenu sort order (indexmenu), custom sort order using the {{include_n>[number]}} on the pages that are included similar to the indexmenu tags (custom). |
rsort | rsort/sort | Reverse the sort order in namespace includes. |
depth | depth=DEPTH | The maximum depth of subnamespaces of which pages are included in namespace includes, default is 1 for only the specified namespace, 0 is for unlimited depth. |
| - | inline | Don't close/open sections when including a page. This flag should be used when the include syntax is used inside other syntax elements like lists or tables or inside other plugin syntax. |
| - | beforeeach=ENTITY/ aftereach=ENTITY | Display an entity before/after each included page. The entity is printed outside the section/include environment, this is mainly for adding custom HTML code (when the text isn't recognized as entity it is directly displayed but escaped so you can't directly use HTML code here). |
safeindex | - | Don't index metadata of included pages that are non-public. This can cause problems with other plugins that use the metadata index and can be safely disabled in wikis where the permissions of the included pages match the permissions of the parent pages. |
| - | exclude=/REGEX/ | Regular expression to exclude certain pages, will match on full page ID. E.g. to exclude ns:page_name use /ns:page_name/ as value. Use a regex tester to debug complicated patterns. |
Examples:
{{page>concept&firstseconly&footer}}
{{page>mypage&noindent}}
{{namespace>myns&order=modified}}
{{namespace>myns&exclude=/myns:subns:.+|myns:page/}}
Macros
Simple macros are possible to serve a page on a per user or per date base. These are:
| @USER@ | username |
|---|---|
| @NAME@ | full name of user |
| @GROUP@ | first group the user belongs to |
| @YEAR@ | 4-digit year |
| @MONTH@ | 2-digit month |
| @WEEK@ | 2-digit ISO week number |
| @DAY@ | 2-digit day |
| @DATE<expr>@ | use a calculated date instead of today in date macros |
<expr> in @DATE<expr>@ can be one of:
| PYEAR | previous year |
|---|---|
| NYEAR | next year |
| PMONTH | previous month |
| NMONTH | next month |
| PWEEK | previous week |
| NWEEK | next week |
| YESTERDAY | yesterday's date |
| TOMORROW | tomorrow's date |
Examples:
{{page>@MONTH@:@DAY@:birthdays}}
includes the page birthdays in namespace <month>:<day>: eg. 10:15: birthdays for the 15th of october.
{{page>@USER@:message}}
includes the page message from the namespace <user> of the logged in user
{{page>foo@DATENWEEK@@YEAR@:@WEEK@}}
includes the page <weekno> from the namespace foo<year> with next week's date e.g. foo2012:01 for the 27th of december 2011
Demo
There is currently no demo site available.
Use of the plugin is shown in this video here: https://www.youtube.com/watch?v=6RO8TSZBedU&t=8m47s
Video not available (2021-03-20)
Development
Change Log
- Version upped (2025/07/23 07:04)
- fix tag for minimum php version (2025/07/23 03:38)
- Version upped (2025/07/05 07:04)
- Merge pull request #363 from dokufreaks/tests (2025/07/05 01:49)
- replace strftime use with dformat (2025/07/04 23:20)
- use newer DokuWiki test workflow (2025/07/04 23:15)
- Merge pull request #360 from dokuwiki-translate/lang_update_1151_1748… (2025/07/04 23:10)
- add minimum php requirement to plugin.info.txt (2025/07/04 23:05)
Bugs / Feature Requests
Please report bugs or feature requests at the Bug tracker.
Known Bugs and Issues
There are currently no known bugs and issues for which no workarounds exist (see FAQ).
FAQ
The include plugin breaks the wrap and folded (and similar) plugins when used inside them
This can be solved by using the inline flag of the include plugin. This mode strips all section from the included page and should solve issues with invalid HTML and thus no longer working wrap and folded plugins. This also solves problems with invalid HTML code when the include plugin is used inside tables or other syntax environments. When the page contains headers this might look strange depending on the template.
Addendum
If you are using the Wrap Plugin on both the page you are using the {{section>target&inline}} from and the page target, you need to make sure any pair of WRAP tags on target are either entirely within the included section or entirely outside of the section. For instance, including the FOO section into another page might break the other page:
<WRAP right 35%> ==== FOO ==== Content goes here </WRAP> ==== BAR ====
FOO contains the </WRAP> end-tag, but not a corresponding start-tag. Thus, if the use of include is within a WRAPed block, that WRAP block will be ended early.
The simplest solution is to never use WRAP on both pages, only on included pages or only on pages that include others – however, that's not very realistic or useful. The other (somewhat brittle) solution is to make the section on target end before the WRAP close tag. You can do this by inserting a dokuwiki section header (at the same level) before the close tag, but after the section's content. However, I've not been able to determine if this is an intended behavior of dokuwiki, or if this is undocumented behavior and therefore subject to change at any time.
So, to make the above example work correctly, it should look like this:
<WRAP right 35%> ==== BAZ ==== Content goes here ==== ==== </WRAP> ==== QUX ====
Now {{section>whatever#BAZ}} will work fine.
Is it possible to include the same page twice?
Yes, this is possible since the 2011-01-01 version and hasn't been possible before. But you can't include the same page again inside a page in order to avoid endless recursion (and things like page1 > page2 > page1 doesn't work, too).
Does the include plugin respect ACLs of the included pages?
The include plugin tries its best to respect ACLs and it should work under normal circumstances. Whenever the view permissions of included pages change the cache is purged and the included pages are adapted according to the current permissions. Due to limitations in the caching system this might fail if a page is accessed very frequently with changing permissions. If this is an issue for you you can disable caching of the affected pages using the ~~NOCACHE~~ syntax. As always there is no guarantee that everything works as expected, please test if everything works and report a bug if you should notice anything unexpected.
As of version 2012-11-24, there is a new security feature called safeindex that is turned on by default, it's purpose is to prevent the indexer from indexing metadata of included pages that aren't public. That way links that are in protected pages won't be visible as link of a public page in the backlinks list.
Why does the include plugin first close the previous section and opens it again afterwards?
This is done because if there are headers in the included page they will close the current section. As the include plugin has its own container div this would produce strange results and possibly invalid HTML. You can use the inline flag in order to avoid this (but then also all sections of the included page are removed).
Has the include plugin feature XYZ/when will you implement XYZ?
The include plugin has many feature and is very flexible and I'm willing to add more features if they fit in the general purpose of the include plugin. However there is no guarantee that I will implement a certain feature at a certain time, this depends completely on my available time and my mood. You can add your wishes to the issue tracker.
How to avoid inclusion of whole page content if section does not exist?
Adding the flag firstsectiononly could be one solution. At least in regard to avoiding very large content being displayed. Adding a header at the source page and using tools like the hiddenheader might solve things at the source page, but in this case seems to conflict and break certain include flag-tasks.
Discussion
Please don't report any bugs or feature requests here but instead use the bug tracker!
If you miss a comment you've created please have a look at the FAQ section and the issue tracker, I might have moved them there, if you can't find a bug report anymore that bug should be solved, please try the current version and report it again if it still doesn't work.
Discussions in DW-forum
- include plugin: development in direction to use it as a kind database tool, feature inspirations.
User comments
footer.php:
// author if ($flags['user']) { $author = $meta['creator']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$author);
replaced to include the real user name in the link:
// author if ($flags['user']) { $author = $meta['creator']; $login = $meta["last_change"]['user']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$login);
User Namespace
Hi, I'm using userpagecreate plugin's to create user's namespace instead of user's page. Then, to link correctly the include's page with his last member who edit it, i rewrite the previous lines like this :
if ($flags['user']) { $login = $meta['last_change']['user']; $author = $auth->getUserData($login); $author = $author['name']; if ($author && $login) { if (strstr($this->getConf('usernamespace'), '@USER@')) { $userpage = cleanID(str_replace('@USER@', $login, $this->getConf('usernamespace'))); } else { $userpage = cleanID($this->getConf('usernamespace').':'.$login); } resolve_pageid(getNS($ID), $userpage, $exists); $class = ($exists ? 'wikilink1' : 'wikilink2'); $link = array( 'url' => wl($userpage), 'title' => $userpage, 'name' => hsc($author), 'target' => $conf['target']['wiki'], 'class' => $class.' url fn', 'pre' => '<span class="vcard author">', 'suf' => '</span>', ); $xhtml[] = $renderer->_formatLink($link); } }
and change my conf into :
$conf['plugin']['include']['usernamespace'] = 'user:@USER@:start';
standard configuration still works.
$conf['plugin']['include']['usernamespace'] = 'user:';
If the @USER@ wildcard is using, replace it by the login name, otherwise, use the standard include's plugin rule.
— garlik 2011/10/24 14:10
— garlik 2011/11/07 11:32 - Summmary : Update the code. will display the right modif author.
showlink vs link flag
When including a page, the flag to make the first heading a link is link, not showlink. This confused me at first because I assumed the flags would have the same names as the configuration options. Example (displays the first section of a product page, with the page heading as a link):
{{page>products:sample&firstseconly&link}}
Controlling header size in included pages
By default, the headers in included pages start one level lower than the last header in the current page. For example, if the section before the include is a level-three header, then a level-6 header in the included page will become a wimply little level-2.
If you want higher-level headers, you can trick the plugin by putting an empty header above the include. In the following example, a level-6 header in the included page will show up as level-5:
=== Some Section ===
Stuff
====== ======
{{page>somepage}}
- Zioth
Including a paragraph or excerpt from a page
See the Hidden Header plugin. -Zioth
2012-01-25 "Angua"
Just tested with the current version and it works for me. — renux 2012/02/10 12:44
Include from same page?
Using it on my knowledge wiki and it works well. However, I'd like to be able to include a section from the current page - for use with the ItemTable Plugin (along with something to hide the inline text of course. — Julian Knight 2012-03-23
Does it still work? Can't make it on my wiki page.
— Piotr 2017-10-04
Align Feature
It'll be great to be able to align included pages. Because a lot of people are using this feature for infobox purposes and some would love to be able to control the alignment of the
{{page>people:obama}}
using the core syntax by adding spaces before of after the syntax.
— James 2014-05-13 20:38
Exclude Feature
It would be nice, if there would be an “exclude” option. When we use the namespace feature, we don't want certain pages in the included in the resulting page: for example exclude “sidebar” or “start”.
— Manuel 2014-10-30 02:42
I would appreciate that feature too.
— Florian 2015-07-18 18:43
Same here, the possibility of the exclusion of listed namespaces would be much appreciated.
— Tommy 2016-2-19 21:18
I totally agree.
—- Chris 2016-2-21 09:12
blog plugin supports Exclude Feature
— HsinTang 2016-07-26
I created a PR for an exclude option! Testing or adding tests would be appreciated.
— sleeping 2020-04-11 07:57
The exclude flag has been merged!
— sleeping 2020-04-16 19:28
Empty Section
We are using the plugin a lot for technical documentation. If we include a named section (#title), and that section doesn't exist, the plugin includes the whole page. This really annoying. Would it be possible to change the behavior so that if a section doesn't exist it doesn't include anything (the same as when a page doesn't exist), please?
— Simon 2015-02-02 14:50
Just thought of asking about this issue. Is there any possibility to avoid that? — Samana Johann 2018-08-20 19:45
No Other data
I love this plugin but I have a question. How do I completely remove all other data included, such as user, mdate, etc.? If I do them as individual flags I still see the grey bar under the included content. There must be a flag that just excludes all the content, right? Am I just missing it somehow?
Thanks!
— Max 2017.03.21
Hi there, I think you are looking for
{{page>ID&nouser&nodate&nofooter}}
Namespace lists using &linkonly and &beforeeach/&aftereach
I've been trying to format a list of pages generated using namespace> with &linkonly - ideally as a simple unordered list. I'm adding this paragraph to help others searching for help because it took me several hours to find out that it is not possible and this is a known issue logged as a feature request.
— vt306 2017.03.29
Thanks to Michael Hamann for the advice. The pagequery plugin is the solution for this.
— vt306 2017.04.06
Option to pass revision of main page to includes pages
We are currently using DokuWiki for technical documentation. Within DokuWiki we use the 'date_at' function to go back to an old revision to see which version of the page a customer recieved. It would be very usefull if the included pages would honour the revision of the main page. To clarify: if the main page is shown at a specific revision, the included pages should also be shown at the last revision before the date of the main page. Would something like that be possible to incorporate?
Thanks in advance! Ruud
Translations
If it is of use, a paticular Translation of the Plugin's info page into German can be taken from here. — Samana Johann 2018-08-20 12:11
Display search results on a page?
Hi, I was wondering if it is possible to display the search result of a term or phrase on a page?
- OYMYO
Passing parameters/arguments
I think it would be cool if this plugin supported options/arguments like in MediaWiki.
Something like this:
- page1.txt
Test by {{{1}}}
- page2.txt
{{page>:page1|Me}}
And page2 would be parsed into:
Test by Me
— hasha2982 2020-08-19 17:12
Sorry, didn't know about the Templater Plugin — hasha2982 2020-08-19 17:25
2026-2-5 19:15:53
Imagelink Plugin
—- plugin —- description: Create nice navigation links with image and title author : peterfromearth email : coder@peterfromearth.de type : syntax lastupdate : 2020-02-29 compatible : depends : conflicts : similar : tags : link image navigation
downloadurl: https://github.com/peterfromearth/dokuwiki-plugin-imagelink/zipball/master bugtracker : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/issues sourcerepo : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/ donationurl:
screenshot_img : https://raw.githubusercontent.com/peterfromearth/dokuwiki-plugin-imagelink/master/example/screenshot.png
Installation
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Examples/Usage
See the plugin in action here.
<imagelink?title=Impressionen>
[[:impressionen|{{ :intro:links:getreide.jpg?linkonly |}}]]
</imagelink>
Syntax
<imagelink?title="TITLE NAME">
[[...|{{...}}]]
</imagelink>
Use image with links see image_links
Configuration and Settings
Development
Change Log
- version 2020-02-29 (2020/03/01 01:59)
- Initial commit (2020/03/01 01:56)
Known Bugs and Issues
ToDo/Wish List
FAQ
Discussion
2026-2-5 19:15:08
Tag Plugin
—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing
downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag
Description
The Tag Plugin lets you assign category tags to wiki pages.
Components
Tag
Add a tag to the page
{{tag>[list of tags]}}
| [list of tags] | a space separated list of tags that describe the content of the current page | required |
|---|
Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.
Examples:
{{tag>tag1 tag2 tag3}}- with namespaces:
{{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}} - multiple word tags:
{{tag>tag1_with_multiple_words tag2 tag3_part}} {{tag>"tag with spaces" tag2}}– Within quotes you can use spaces. Tag is stored internally with underscores_.
Topic
List all pages with given tags.
{{topic>[tag]&[flags]}}
| [tag] | the category tag for which you want a list of pages | required |
|---|---|---|
| [flags] | pagelist flags delimited by &, see flags | optional |
This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:
- If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
+creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the+(AND), so each listed page must have this tag.-removes all pages tagged with the given tag from the list of already found pages (NOT).
Example:
{{topic>tag1 -tag2}}– Lists all pages tagged with tag1 but not with tag2.{{topic>tag1 +tag2}}– Lists all pages tagged with tag1 and tag2.{{topic>tag1 tag2}}– Lists all pages tagged with either tag1 or tag2 or both.{{topic>ns1?tag1 tag2}}– List all pages inside namespace ns1 tagged with either tag1 or tag2{{topic>.?tag1 tag2}}– List all pages inside the current namespace tagged with either tag1 or tag2{{topic>tag1 tag2 tag3&nodate&desc&sort}}(Adding pagelist options to change the design)
Searchtags
Search form for filtering by tag.
{{searchtags&[flags]}}
| [flags] | pagelist flags delimited by &, see flags | optional |
|---|
This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.
This is a great feature which you should not miss. Please add a screenshot of this cool feature.
And you might check out TagFilter Plugin for similar purpose but in different scenarios.
Example:
{{searchtags}}– The basic syntax{{searchtags&nodate&desc&sort}}– with pagelist options to change the design{{searchtags&nonsform}}– hide the namespace selector
Count
Shows a list of tags and its number of occurrences.
{{count>[tag][&namespace]}}
| [tags] | The tag for which you want to list the occurrence. Multiple tags separated by spaces. | optional |
|---|---|---|
| &[namespaces] | Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. | optional |
This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.
Example:
{{count>+}}– List all tags with related occurrences.{{count>tag1 tag2}}– List the occurrence of tag1 and tag2.{{count>tag1 tag2 tag3&. ns1 ns2}}– List all occurrences for the given tags inside the namespaces (the dot.specifies the root namespace){{count>+&ns1 ns2}}– List all tags inns1andns2.
Tagpage
Make link to the tag list
{{tagpage>[tag][&dynamic][|title]}}
This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.
Example:
{{tagpage>test_foo}}– The basic syntax{{tagpage>test_foo&dynamic}}– A link with dynamic link color{{tagpage>test_foo|my title}}– A link with custom title{{tagpage>test_foo&dynamic|my | title}}– A link with dynamic link color and custom title (that can also contain|)
Configuration
The plugin can be configured with the DokuWiki configuration manager available in the admin menu.
namespace | Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag |
|---|---|
sortkey | Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title |
sortorder | Sort order of the topic overview (ascending or descending) |
pagelist_flags | Comma separated Flags of the pagelist plugin which is used to display the topic overview |
toolbar_icon | Show icon in page editor toolbar to add tags. |
list_tags_of_subns | When counting tags in specified namespaces include also tags in subnamespaces. |
tags_list_css | Choose tags list style between standard or optimised for top of page position. |
Tagindex Rebuild
If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.
Demo / Screenshots
Changes
- 2014-02-16
- New and updated translations
- Fixed tag searching with out of date indexes and numbers
- Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
- 2013-04-14
- New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
- Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
- In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
- The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
- Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
- 2013-04-05:
- New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
- Removed the Technorati ping feature as Technorati is no longer using any pings
- zh-tw translation updated
- 2013-02-15:
fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
- 2012-11-25
- New searchtags feature, displays a search form for the topic syntax
- Fix section edit button styles for the new dokuwiki template
- In the topic syntax now really only namespaces and not pages are matched by namespace parameter
- When sorting by the title the case is ignored now
- Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
- 2012-08-24
- The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
- Tags are now normalized in the same way as page ids are normalized
Development changelog:
- Merge pull request #257 from dokuwiki-translate/lang_update_749_17017… (2023/12/06 04:53)
- translation update (2023/12/05 22:20)
- update plugin.info.txt (2023/10/18 04:40)
- Make selector less specific by using .dokuwiki (2023/10/18 04:39)
- Version upped (2023/09/12 05:50)
- Merge pull request #254 from Miro-Collas/master (2023/09/11 23:31)
- Another minor fix (2023/09/11 07:10)
- Miro bugfix (2023/09/11 07:04)
Sites using this Plugin
Feel free to add yours here:
- http://tokeek.de (German)
- Prinz Eisenherz Lexikon (German)
- Psiconauti (Italian)
- Blog Fred Radeff (French)
FAQ
How to use tags which consist of multiple words?
Just use an “_”, it gets automatically replaced by a “ ” i.e.:
{{tag>tag_with_multiple_words}}
Also, quotes seem to work:
{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work
Let's use one of the example websites.
If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess
This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use
RewriteCond %{REQUEST_URI} !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$ tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags
This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.
- action.php
function _handle_keywords(&$data) { global $ID; // Fetch tags for the page; stop proceeding when no tags specified $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER); if(is_null($tags)) return; // Replace underscores with blanks foreach($data->data['meta'] as &$meta) { if($meta['name'] == 'keywords') { $meta['content'] = str_replace('_', ' ', $meta['content']); // add extra styling $t = explode(',', $meta['content']); if(in_array('deprecated', $t)) { $data->data['style'][] = array('type' => 'text/css', '_data' => '.dokuwiki .page {background-color: red;}'); } } } }
Customizing the breadcrumbs
If you add at pagelist/helper.php
function tpl_youarehere2_help($id){ $result = ''; global $conf; global $ID; global $lang; // check if enabled if(!$conf['youarehere']) return false; $parts = explode(':', $id); $count = count($parts); // always print the startpage $result .= html_wikilink(':'.$conf['start']); // print intermediate namespace links $part = ''; for($i=0; $i<$count - 1; $i++){ $part .= $parts[$i].':'; $page = $part; if ($page == $conf['start']) continue; // Skip startpage // output $result .= ' » '.html_wikilink($page); } // print current page, skipping start page, skipping for namespace index resolve_pageid('',$page,$exists); if(isset($page) && $page==$part.$parts[$i]) return $result; $page = $part.$parts[$i]; if($page == $conf['start']) return $result; $result .= ' » '.html_wikilink($page); return $result; } function tpl_youarehere2($id) { $str = $this->tpl_youarehere2_help($id); $pos = strrpos($str , '»'); if ($pos == -1) return $str; return substr($str, 0, $pos); } function addPage2($page) { $id = $page['id']; if (!$id) return false; $this->page = $page; $this->_meta = NULL; // priority and draft if (!isset($this->page['draft'])) { $this->page['draft'] = ($this->_getMeta('type') == 'draft'); } $class = ''; if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' '; if ($this->page['draft']) $class .= 'draft '; if ($this->page['class']) $class .= $this->page['class']; if(!empty($class)) $class = ' class="' . $class . '"'; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->_pageCell($id); if ($this->column['date']) $this->_dateCell(); if ($this->column['user']) $this->_userCell(); if ($this->column['desc']) $this->_descCell(); foreach ($this->plugins as $plug => $col) { if ($this->column[$col]) $this->_pluginCell($plug, $col, $id); } $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">'; $this->doc .= $this->tpl_youarehere2($id); $this->doc .='</td>'.DOKU_LF; $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; return true; }
And change tag/action.php
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage($page); }
to
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage2($page); }
After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.
Bad appearance when displaying tags at top of page
Integrated to main code (see tags_list_css) option
When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:
div.dokuwiki div.tags { border-top: 2px dotted __border__; font-size: 95%; text-align: right; /* clear: both; */ }
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10
You need to add copy of the existing tag pattern, and modify it to
- syntax/tag.php
$this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag'); //e.g. Spanish: $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers
Is there a way to group pages by the first letter of their name or header?
Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list
No.
Collapsible outline of all tags?
My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21
—
I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx
Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.
For bugs or feature requests, there is the bug tracker linked here : Bug tracker.
This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.
If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?
Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
- Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
- Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
- In most of my installation it works, in some not… clueless!
- How to sort the taglist (count>+) alphabetical?
My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02
Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks
Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02
Blank pages
I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(
All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(
I am using Debian Wheezy and I am having the same issue.
»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V
Nothing was found.
Same here, get a Nothing was found page.
(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.
SEO meta keywords
Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00
Sorting the {{count>}} results
Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42
This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan
In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim
Unorderd List of all tags?
Is there a way to gen an unorderd list of all tags, similar as
| Tag | # |
|---|---|
| 临汾文脉 | 1 |
| 霍州文史 | 1 |
| 文史广告 | 1 |
| 隰县 | 1 |
| 乡宁 | 1 |
| 乡宁文史 | 1 |
| 襄汾文史 | 1 |
, but without table and occurrences?
Filtering the list of Tags?
Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.
Add "*" to list all the tags under a tag namespace?
I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use
{{topic> ns1:*}}
to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28
—
Columns?
2024-12-23
Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.
Count Table Columns
2025-05-01
I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.
It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.
Exclude subnamespaces
I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?
2026-2-5 16:38:34
====== Add New Page Plugin
Compatible with DokuWiki
2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection
Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere
Tagged with button, create, form
Needed for autoincludeindex
By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).
The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.
The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.
The form submit button is disabled if there is no text in the title field.
Edit
Usage
Put
anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.
Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.
with configuration option “Hide namespace selection” enabled.
with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:
Or, to specify a namespace:
Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).
Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,
will create a new namespace within the foo namespace.
Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification
When used together with the autopage option to hide the input field, a daily page can be created with a single button click:
Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.
General syntax:
?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:
overwrite the default hide setting
custom namespace exclusion and hide root
disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub
Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option
Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.
Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:
Use the newtpl template
Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one
The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.
Edit
Multiple occurences
The
syntax may be added multiple times on the same page.
Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:
<?php echo p_render('xhtml',p_get_instructions('
'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.
Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:
Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?
This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?
Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?
Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development
2026-2-5 15:54:19
all above flags does not work, the index pages in sub namespace is still included .
This is global configuration, you should configure it inConfiguration Manager. — Siyuan Liu 2023-08-17
Discussion
Please report bugs or feature requests at the Bug tracker.
Is it possible to make a blog in one namespace be in ascending order, and a blog in a different namespace to be in descending order?
2026-2-5 15:55:33
====== Add New Page Plugin
Compatible with DokuWiki
2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection
Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere
Tagged with button, create, form
Needed for autoincludeindex
By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).
The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.
The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.
The form submit button is disabled if there is no text in the title field.
Edit
Usage
Put
anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.
Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.
with configuration option “Hide namespace selection” enabled.
with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:
Or, to specify a namespace:
Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).
Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,
will create a new namespace within the foo namespace.
Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification
When used together with the autopage option to hide the input field, a daily page can be created with a single button click:
Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.
General syntax:
?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:
overwrite the default hide setting
custom namespace exclusion and hide root
disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub
Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option
Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.
Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:
Use the newtpl template
Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one
The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.
Edit
Multiple occurences
The
syntax may be added multiple times on the same page.
Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:
<?php echo p_render('xhtml',p_get_instructions('
'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.
Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:
Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?
This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?
Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?
Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development
2026-2-5 15:54:19
Include Plugin
—- plugin —- description: Include another wiki page into the current one author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, helper lastupdate : 2025-07-22 updatemessage: Since the release of June 2025, minimal PHP 8 is required. compatible : Greebo, Frusterick Manners, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : conflicts : mediasyntax, PhotoGallery similar : wst tags : include, embed
downloadurl: https://github.com/dokufreaks/plugin-include/tarball/master bugtracker : https://github.com/dokufreaks/plugin-include/issues sourcerepo : https://github.com/dokufreaks/plugin-include/ donationurl:
The 2018-11-29 release fixes a security issue where ACLs were ignored for pages in namespace includes with DokuWiki version Greebo. If you rely on ACL checks in namespace includes or allow edits from users who must not see all pages, please upgrade ASAP!
This is a handy plugin with which you can include another wiki page into the current one. Just including certain sections of a page or even whole namespaces is supported, too.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
If you need support for older version of DokuWiki you can try the 2009-11-27 version of the include plugin, but please note that this old version has known bugs. If you need support for older versions of DokuWiki in the current include plugin version please open a feature request in the issue tracker.
Examples
{{page>wiki:syntax#Tables}} will include the section about tables of the syntax page.
{{namespace>project_foo}} will include all pages in the project_foo namespace.
{{page>blog:mypage&tags&comments}} will include the page blog:mypage and show the tags from the tag plugin and the number of comments from the discussion plugin. Both plugins need to be installed for this example.
{{tagtopic>testtag}} will include all pages with the tag testtag, the tag plugin needs to be installed for this example.
Syntax
The plugin offers four syntaxes, {{page>...}} , {{section>...}} , {{namespace>...}} and {{tagtopic>...}}.
Section is aimed more at including sections, page at including whole pages and namespace at including whole namespaces. Tagtopic includes all pages with a tagtopic tag.
{{page>[id]&[flags]}}
{{section>[id]#[section]&[flags]}}
{{namespace>[namespace]#[section]&[flags]}}
{{tagtopic>[tag]&[flags]}}
| [id] | page ID of the page to include; some macros are possible; shortcuts are resolved (:, ., ..) | required |
|---|---|---|
| [section] | limits the included page to a specific section and its subsections | optional; default is the whole page , this can be used with namespace (if matches) |
| [tag] | include pages with tag topic tag, requires tag | required |
| [flags] | flags delimited by &, see flags | optional |
Configuration and Flags
The plugin can be configured in the DokuWiki configuration manager available in the admin menu. These settings also affect the blog plugin which uses the include plugin to generate the blog page. For most settings there are flags that allow to override the setting. Some features are only available as flag.
| Configuration option | Flags | Description |
|---|---|---|
noheader | noheader/ (show)header | Don't display the header of the inserted section |
firstseconly | firstsec(tion)only/ fullpage | Display only the first section of the included page |
readmore | readmore/noreadmore | Show “read more” link in case of firstsection only |
showtaglogos | - | Show/hide an image for the first tag (if the page has tags) |
showfooter | footer/nofooter | Show/hide page footer below the included page |
showlink | link/nolink | Makes the first headline of a included page/section a link to the included page/section |
showpermalink | permalink/ nopermalink | Show/hide a permalink to the included page in the page footer |
showdate | date/nodate | Show/hide creation date of the page in the page footer |
showmdate | mdate/nomdate | Show/hide modification date of the page in the page footer |
showuser | user/nouser | Show/hide user name of the page creator in the page footer |
showcomments | comments/nocomments | Show/hide number of comments in the page footer (requires the discussion plugin) |
showlinkbacks | linkbacks/nolinkbacks | Show/hide number of linkbacks in the page footer (requires the linkback or backlinks plugin) |
showtags | tags/notags | Show/hide tags in the page footer (requires the tag plugin) |
showeditbtn | editbtn or editbutton/noeditbtn or noeditbutton | Show/hide edit buttons (section edit buttons, edit button below the included page) |
doredirect | redirect/noredirect | Redirect back to original page after an edit |
usernamespace | - | Namespace for user pages (see showuser configuration) (default user) |
doindent | indent/noindent | Indent included pages relative to the section of the page they get included in |
linkonly | linkonly/nolinkonly or include_content | Display only a link instead of the whole page content |
title | title/notitle | Show the title instead of the page id |
pageexists | pageexists/ nopageexists | Only list page ids of existing pages (see existlink) |
| - | existlink | Display a link and do so only if page page-id exists (combination of linkonly and pageexists) |
parlink | parlink/noparlink | (Don't) put the link into a paragraph environment (for inline lists) |
order | order=OPTION | Ordering criteria for namespace includes, possible options: page ID (id), title (title), date created (created), date modified (modified), indexmenu sort order (indexmenu), custom sort order using the {{include_n>[number]}} on the pages that are included similar to the indexmenu tags (custom). |
rsort | rsort/sort | Reverse the sort order in namespace includes. |
depth | depth=DEPTH | The maximum depth of subnamespaces of which pages are included in namespace includes, default is 1 for only the specified namespace, 0 is for unlimited depth. |
| - | inline | Don't close/open sections when including a page. This flag should be used when the include syntax is used inside other syntax elements like lists or tables or inside other plugin syntax. |
| - | beforeeach=ENTITY/ aftereach=ENTITY | Display an entity before/after each included page. The entity is printed outside the section/include environment, this is mainly for adding custom HTML code (when the text isn't recognized as entity it is directly displayed but escaped so you can't directly use HTML code here). |
safeindex | - | Don't index metadata of included pages that are non-public. This can cause problems with other plugins that use the metadata index and can be safely disabled in wikis where the permissions of the included pages match the permissions of the parent pages. |
| - | exclude=/REGEX/ | Regular expression to exclude certain pages, will match on full page ID. E.g. to exclude ns:page_name use /ns:page_name/ as value. Use a regex tester to debug complicated patterns. |
Examples:
{{page>concept&firstseconly&footer}}
{{page>mypage&noindent}}
{{namespace>myns&order=modified}}
{{namespace>myns&exclude=/myns:subns:.+|myns:page/}}
Macros
Simple macros are possible to serve a page on a per user or per date base. These are:
| @USER@ | username |
|---|---|
| @NAME@ | full name of user |
| @GROUP@ | first group the user belongs to |
| @YEAR@ | 4-digit year |
| @MONTH@ | 2-digit month |
| @WEEK@ | 2-digit ISO week number |
| @DAY@ | 2-digit day |
| @DATE<expr>@ | use a calculated date instead of today in date macros |
<expr> in @DATE<expr>@ can be one of:
| PYEAR | previous year |
|---|---|
| NYEAR | next year |
| PMONTH | previous month |
| NMONTH | next month |
| PWEEK | previous week |
| NWEEK | next week |
| YESTERDAY | yesterday's date |
| TOMORROW | tomorrow's date |
Examples:
{{page>@MONTH@:@DAY@:birthdays}}
includes the page birthdays in namespace <month>:<day>: eg. 10:15: birthdays for the 15th of october.
{{page>@USER@:message}}
includes the page message from the namespace <user> of the logged in user
{{page>foo@DATENWEEK@@YEAR@:@WEEK@}}
includes the page <weekno> from the namespace foo<year> with next week's date e.g. foo2012:01 for the 27th of december 2011
Demo
There is currently no demo site available.
Use of the plugin is shown in this video here: https://www.youtube.com/watch?v=6RO8TSZBedU&t=8m47s
Video not available (2021-03-20)
Development
Change Log
- Version upped (2025/07/23 07:04)
- fix tag for minimum php version (2025/07/23 03:38)
- Version upped (2025/07/05 07:04)
- Merge pull request #363 from dokufreaks/tests (2025/07/05 01:49)
- replace strftime use with dformat (2025/07/04 23:20)
- use newer DokuWiki test workflow (2025/07/04 23:15)
- Merge pull request #360 from dokuwiki-translate/lang_update_1151_1748… (2025/07/04 23:10)
- add minimum php requirement to plugin.info.txt (2025/07/04 23:05)
Bugs / Feature Requests
Please report bugs or feature requests at the Bug tracker.
Known Bugs and Issues
There are currently no known bugs and issues for which no workarounds exist (see FAQ).
FAQ
The include plugin breaks the wrap and folded (and similar) plugins when used inside them
This can be solved by using the inline flag of the include plugin. This mode strips all section from the included page and should solve issues with invalid HTML and thus no longer working wrap and folded plugins. This also solves problems with invalid HTML code when the include plugin is used inside tables or other syntax environments. When the page contains headers this might look strange depending on the template.
Addendum
If you are using the Wrap Plugin on both the page you are using the {{section>target&inline}} from and the page target, you need to make sure any pair of WRAP tags on target are either entirely within the included section or entirely outside of the section. For instance, including the FOO section into another page might break the other page:
<WRAP right 35%> ==== FOO ==== Content goes here </WRAP> ==== BAR ====
FOO contains the </WRAP> end-tag, but not a corresponding start-tag. Thus, if the use of include is within a WRAPed block, that WRAP block will be ended early.
The simplest solution is to never use WRAP on both pages, only on included pages or only on pages that include others – however, that's not very realistic or useful. The other (somewhat brittle) solution is to make the section on target end before the WRAP close tag. You can do this by inserting a dokuwiki section header (at the same level) before the close tag, but after the section's content. However, I've not been able to determine if this is an intended behavior of dokuwiki, or if this is undocumented behavior and therefore subject to change at any time.
So, to make the above example work correctly, it should look like this:
<WRAP right 35%> ==== BAZ ==== Content goes here ==== ==== </WRAP> ==== QUX ====
Now {{section>whatever#BAZ}} will work fine.
Is it possible to include the same page twice?
Yes, this is possible since the 2011-01-01 version and hasn't been possible before. But you can't include the same page again inside a page in order to avoid endless recursion (and things like page1 > page2 > page1 doesn't work, too).
Does the include plugin respect ACLs of the included pages?
The include plugin tries its best to respect ACLs and it should work under normal circumstances. Whenever the view permissions of included pages change the cache is purged and the included pages are adapted according to the current permissions. Due to limitations in the caching system this might fail if a page is accessed very frequently with changing permissions. If this is an issue for you you can disable caching of the affected pages using the ~~NOCACHE~~ syntax. As always there is no guarantee that everything works as expected, please test if everything works and report a bug if you should notice anything unexpected.
As of version 2012-11-24, there is a new security feature called safeindex that is turned on by default, it's purpose is to prevent the indexer from indexing metadata of included pages that aren't public. That way links that are in protected pages won't be visible as link of a public page in the backlinks list.
Why does the include plugin first close the previous section and opens it again afterwards?
This is done because if there are headers in the included page they will close the current section. As the include plugin has its own container div this would produce strange results and possibly invalid HTML. You can use the inline flag in order to avoid this (but then also all sections of the included page are removed).
Has the include plugin feature XYZ/when will you implement XYZ?
The include plugin has many feature and is very flexible and I'm willing to add more features if they fit in the general purpose of the include plugin. However there is no guarantee that I will implement a certain feature at a certain time, this depends completely on my available time and my mood. You can add your wishes to the issue tracker.
How to avoid inclusion of whole page content if section does not exist?
Adding the flag firstsectiononly could be one solution. At least in regard to avoiding very large content being displayed. Adding a header at the source page and using tools like the hiddenheader might solve things at the source page, but in this case seems to conflict and break certain include flag-tasks.
Discussion
Please don't report any bugs or feature requests here but instead use the bug tracker!
If you miss a comment you've created please have a look at the FAQ section and the issue tracker, I might have moved them there, if you can't find a bug report anymore that bug should be solved, please try the current version and report it again if it still doesn't work.
Discussions in DW-forum
- include plugin: development in direction to use it as a kind database tool, feature inspirations.
User comments
footer.php:
// author if ($flags['user']) { $author = $meta['creator']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$author);
replaced to include the real user name in the link:
// author if ($flags['user']) { $author = $meta['creator']; $login = $meta["last_change"]['user']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$login);
User Namespace
Hi, I'm using userpagecreate plugin's to create user's namespace instead of user's page. Then, to link correctly the include's page with his last member who edit it, i rewrite the previous lines like this :
if ($flags['user']) { $login = $meta['last_change']['user']; $author = $auth->getUserData($login); $author = $author['name']; if ($author && $login) { if (strstr($this->getConf('usernamespace'), '@USER@')) { $userpage = cleanID(str_replace('@USER@', $login, $this->getConf('usernamespace'))); } else { $userpage = cleanID($this->getConf('usernamespace').':'.$login); } resolve_pageid(getNS($ID), $userpage, $exists); $class = ($exists ? 'wikilink1' : 'wikilink2'); $link = array( 'url' => wl($userpage), 'title' => $userpage, 'name' => hsc($author), 'target' => $conf['target']['wiki'], 'class' => $class.' url fn', 'pre' => '<span class="vcard author">', 'suf' => '</span>', ); $xhtml[] = $renderer->_formatLink($link); } }
and change my conf into :
$conf['plugin']['include']['usernamespace'] = 'user:@USER@:start';
standard configuration still works.
$conf['plugin']['include']['usernamespace'] = 'user:';
If the @USER@ wildcard is using, replace it by the login name, otherwise, use the standard include's plugin rule.
— garlik 2011/10/24 14:10
— garlik 2011/11/07 11:32 - Summmary : Update the code. will display the right modif author.
showlink vs link flag
When including a page, the flag to make the first heading a link is link, not showlink. This confused me at first because I assumed the flags would have the same names as the configuration options. Example (displays the first section of a product page, with the page heading as a link):
{{page>products:sample&firstseconly&link}}
Controlling header size in included pages
By default, the headers in included pages start one level lower than the last header in the current page. For example, if the section before the include is a level-three header, then a level-6 header in the included page will become a wimply little level-2.
If you want higher-level headers, you can trick the plugin by putting an empty header above the include. In the following example, a level-6 header in the included page will show up as level-5:
=== Some Section ===
Stuff
====== ======
{{page>somepage}}
- Zioth
Including a paragraph or excerpt from a page
See the Hidden Header plugin. -Zioth
2012-01-25 "Angua"
Just tested with the current version and it works for me. — renux 2012/02/10 12:44
Include from same page?
Using it on my knowledge wiki and it works well. However, I'd like to be able to include a section from the current page - for use with the ItemTable Plugin (along with something to hide the inline text of course. — Julian Knight 2012-03-23
Does it still work? Can't make it on my wiki page.
— Piotr 2017-10-04
Align Feature
It'll be great to be able to align included pages. Because a lot of people are using this feature for infobox purposes and some would love to be able to control the alignment of the
{{page>people:obama}}
using the core syntax by adding spaces before of after the syntax.
— James 2014-05-13 20:38
Exclude Feature
It would be nice, if there would be an “exclude” option. When we use the namespace feature, we don't want certain pages in the included in the resulting page: for example exclude “sidebar” or “start”.
— Manuel 2014-10-30 02:42
I would appreciate that feature too.
— Florian 2015-07-18 18:43
Same here, the possibility of the exclusion of listed namespaces would be much appreciated.
— Tommy 2016-2-19 21:18
I totally agree.
—- Chris 2016-2-21 09:12
blog plugin supports Exclude Feature
— HsinTang 2016-07-26
I created a PR for an exclude option! Testing or adding tests would be appreciated.
— sleeping 2020-04-11 07:57
The exclude flag has been merged!
— sleeping 2020-04-16 19:28
Empty Section
We are using the plugin a lot for technical documentation. If we include a named section (#title), and that section doesn't exist, the plugin includes the whole page. This really annoying. Would it be possible to change the behavior so that if a section doesn't exist it doesn't include anything (the same as when a page doesn't exist), please?
— Simon 2015-02-02 14:50
Just thought of asking about this issue. Is there any possibility to avoid that? — Samana Johann 2018-08-20 19:45
No Other data
I love this plugin but I have a question. How do I completely remove all other data included, such as user, mdate, etc.? If I do them as individual flags I still see the grey bar under the included content. There must be a flag that just excludes all the content, right? Am I just missing it somehow?
Thanks!
— Max 2017.03.21
Hi there, I think you are looking for
{{page>ID&nouser&nodate&nofooter}}
Namespace lists using &linkonly and &beforeeach/&aftereach
I've been trying to format a list of pages generated using namespace> with &linkonly - ideally as a simple unordered list. I'm adding this paragraph to help others searching for help because it took me several hours to find out that it is not possible and this is a known issue logged as a feature request.
— vt306 2017.03.29
Thanks to Michael Hamann for the advice. The pagequery plugin is the solution for this.
— vt306 2017.04.06
Option to pass revision of main page to includes pages
We are currently using DokuWiki for technical documentation. Within DokuWiki we use the 'date_at' function to go back to an old revision to see which version of the page a customer recieved. It would be very usefull if the included pages would honour the revision of the main page. To clarify: if the main page is shown at a specific revision, the included pages should also be shown at the last revision before the date of the main page. Would something like that be possible to incorporate?
Thanks in advance! Ruud
Translations
If it is of use, a paticular Translation of the Plugin's info page into German can be taken from here. — Samana Johann 2018-08-20 12:11
Display search results on a page?
Hi, I was wondering if it is possible to display the search result of a term or phrase on a page?
- OYMYO
Passing parameters/arguments
I think it would be cool if this plugin supported options/arguments like in MediaWiki.
Something like this:
- page1.txt
Test by {{{1}}}
- page2.txt
{{page>:page1|Me}}
And page2 would be parsed into:
Test by Me
— hasha2982 2020-08-19 17:12
Sorry, didn't know about the Templater Plugin — hasha2982 2020-08-19 17:25
2026-2-5 19:15:53
Imagelink Plugin
—- plugin —- description: Create nice navigation links with image and title author : peterfromearth email : coder@peterfromearth.de type : syntax lastupdate : 2020-02-29 compatible : depends : conflicts : similar : tags : link image navigation
downloadurl: https://github.com/peterfromearth/dokuwiki-plugin-imagelink/zipball/master bugtracker : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/issues sourcerepo : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/ donationurl:
screenshot_img : https://raw.githubusercontent.com/peterfromearth/dokuwiki-plugin-imagelink/master/example/screenshot.png
Installation
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Examples/Usage
See the plugin in action here.
<imagelink?title=Impressionen>
[[:impressionen|{{ :intro:links:getreide.jpg?linkonly |}}]]
</imagelink>
Syntax
<imagelink?title="TITLE NAME">
[[...|{{...}}]]
</imagelink>
Use image with links see image_links
Configuration and Settings
Development
Change Log
- version 2020-02-29 (2020/03/01 01:59)
- Initial commit (2020/03/01 01:56)
Known Bugs and Issues
ToDo/Wish List
FAQ
Discussion
2026-2-5 19:15:08
Tag Plugin
—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing
downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag
Description
The Tag Plugin lets you assign category tags to wiki pages.
Components
Tag
Add a tag to the page
{{tag>[list of tags]}}
| [list of tags] | a space separated list of tags that describe the content of the current page | required |
|---|
Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.
Examples:
{{tag>tag1 tag2 tag3}}- with namespaces:
{{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}} - multiple word tags:
{{tag>tag1_with_multiple_words tag2 tag3_part}} {{tag>"tag with spaces" tag2}}– Within quotes you can use spaces. Tag is stored internally with underscores_.
Topic
List all pages with given tags.
{{topic>[tag]&[flags]}}
| [tag] | the category tag for which you want a list of pages | required |
|---|---|---|
| [flags] | pagelist flags delimited by &, see flags | optional |
This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:
- If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
+creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the+(AND), so each listed page must have this tag.-removes all pages tagged with the given tag from the list of already found pages (NOT).
Example:
{{topic>tag1 -tag2}}– Lists all pages tagged with tag1 but not with tag2.{{topic>tag1 +tag2}}– Lists all pages tagged with tag1 and tag2.{{topic>tag1 tag2}}– Lists all pages tagged with either tag1 or tag2 or both.{{topic>ns1?tag1 tag2}}– List all pages inside namespace ns1 tagged with either tag1 or tag2{{topic>.?tag1 tag2}}– List all pages inside the current namespace tagged with either tag1 or tag2{{topic>tag1 tag2 tag3&nodate&desc&sort}}(Adding pagelist options to change the design)
Searchtags
Search form for filtering by tag.
{{searchtags&[flags]}}
| [flags] | pagelist flags delimited by &, see flags | optional |
|---|
This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.
This is a great feature which you should not miss. Please add a screenshot of this cool feature.
And you might check out TagFilter Plugin for similar purpose but in different scenarios.
Example:
{{searchtags}}– The basic syntax{{searchtags&nodate&desc&sort}}– with pagelist options to change the design{{searchtags&nonsform}}– hide the namespace selector
Count
Shows a list of tags and its number of occurrences.
{{count>[tag][&namespace]}}
| [tags] | The tag for which you want to list the occurrence. Multiple tags separated by spaces. | optional |
|---|---|---|
| &[namespaces] | Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. | optional |
This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.
Example:
{{count>+}}– List all tags with related occurrences.{{count>tag1 tag2}}– List the occurrence of tag1 and tag2.{{count>tag1 tag2 tag3&. ns1 ns2}}– List all occurrences for the given tags inside the namespaces (the dot.specifies the root namespace){{count>+&ns1 ns2}}– List all tags inns1andns2.
Tagpage
Make link to the tag list
{{tagpage>[tag][&dynamic][|title]}}
This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.
Example:
{{tagpage>test_foo}}– The basic syntax{{tagpage>test_foo&dynamic}}– A link with dynamic link color{{tagpage>test_foo|my title}}– A link with custom title{{tagpage>test_foo&dynamic|my | title}}– A link with dynamic link color and custom title (that can also contain|)
Configuration
The plugin can be configured with the DokuWiki configuration manager available in the admin menu.
namespace | Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag |
|---|---|
sortkey | Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title |
sortorder | Sort order of the topic overview (ascending or descending) |
pagelist_flags | Comma separated Flags of the pagelist plugin which is used to display the topic overview |
toolbar_icon | Show icon in page editor toolbar to add tags. |
list_tags_of_subns | When counting tags in specified namespaces include also tags in subnamespaces. |
tags_list_css | Choose tags list style between standard or optimised for top of page position. |
Tagindex Rebuild
If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.
Demo / Screenshots
Changes
- 2014-02-16
- New and updated translations
- Fixed tag searching with out of date indexes and numbers
- Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
- 2013-04-14
- New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
- Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
- In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
- The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
- Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
- 2013-04-05:
- New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
- Removed the Technorati ping feature as Technorati is no longer using any pings
- zh-tw translation updated
- 2013-02-15:
fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
- 2012-11-25
- New searchtags feature, displays a search form for the topic syntax
- Fix section edit button styles for the new dokuwiki template
- In the topic syntax now really only namespaces and not pages are matched by namespace parameter
- When sorting by the title the case is ignored now
- Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
- 2012-08-24
- The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
- Tags are now normalized in the same way as page ids are normalized
Development changelog:
- Merge pull request #257 from dokuwiki-translate/lang_update_749_17017… (2023/12/06 04:53)
- translation update (2023/12/05 22:20)
- update plugin.info.txt (2023/10/18 04:40)
- Make selector less specific by using .dokuwiki (2023/10/18 04:39)
- Version upped (2023/09/12 05:50)
- Merge pull request #254 from Miro-Collas/master (2023/09/11 23:31)
- Another minor fix (2023/09/11 07:10)
- Miro bugfix (2023/09/11 07:04)
Sites using this Plugin
Feel free to add yours here:
- http://tokeek.de (German)
- Prinz Eisenherz Lexikon (German)
- Psiconauti (Italian)
- Blog Fred Radeff (French)
FAQ
How to use tags which consist of multiple words?
Just use an “_”, it gets automatically replaced by a “ ” i.e.:
{{tag>tag_with_multiple_words}}
Also, quotes seem to work:
{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work
Let's use one of the example websites.
If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess
This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use
RewriteCond %{REQUEST_URI} !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$ tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags
This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.
- action.php
function _handle_keywords(&$data) { global $ID; // Fetch tags for the page; stop proceeding when no tags specified $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER); if(is_null($tags)) return; // Replace underscores with blanks foreach($data->data['meta'] as &$meta) { if($meta['name'] == 'keywords') { $meta['content'] = str_replace('_', ' ', $meta['content']); // add extra styling $t = explode(',', $meta['content']); if(in_array('deprecated', $t)) { $data->data['style'][] = array('type' => 'text/css', '_data' => '.dokuwiki .page {background-color: red;}'); } } } }
Customizing the breadcrumbs
If you add at pagelist/helper.php
function tpl_youarehere2_help($id){ $result = ''; global $conf; global $ID; global $lang; // check if enabled if(!$conf['youarehere']) return false; $parts = explode(':', $id); $count = count($parts); // always print the startpage $result .= html_wikilink(':'.$conf['start']); // print intermediate namespace links $part = ''; for($i=0; $i<$count - 1; $i++){ $part .= $parts[$i].':'; $page = $part; if ($page == $conf['start']) continue; // Skip startpage // output $result .= ' » '.html_wikilink($page); } // print current page, skipping start page, skipping for namespace index resolve_pageid('',$page,$exists); if(isset($page) && $page==$part.$parts[$i]) return $result; $page = $part.$parts[$i]; if($page == $conf['start']) return $result; $result .= ' » '.html_wikilink($page); return $result; } function tpl_youarehere2($id) { $str = $this->tpl_youarehere2_help($id); $pos = strrpos($str , '»'); if ($pos == -1) return $str; return substr($str, 0, $pos); } function addPage2($page) { $id = $page['id']; if (!$id) return false; $this->page = $page; $this->_meta = NULL; // priority and draft if (!isset($this->page['draft'])) { $this->page['draft'] = ($this->_getMeta('type') == 'draft'); } $class = ''; if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' '; if ($this->page['draft']) $class .= 'draft '; if ($this->page['class']) $class .= $this->page['class']; if(!empty($class)) $class = ' class="' . $class . '"'; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->_pageCell($id); if ($this->column['date']) $this->_dateCell(); if ($this->column['user']) $this->_userCell(); if ($this->column['desc']) $this->_descCell(); foreach ($this->plugins as $plug => $col) { if ($this->column[$col]) $this->_pluginCell($plug, $col, $id); } $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">'; $this->doc .= $this->tpl_youarehere2($id); $this->doc .='</td>'.DOKU_LF; $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; return true; }
And change tag/action.php
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage($page); }
to
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage2($page); }
After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.
Bad appearance when displaying tags at top of page
Integrated to main code (see tags_list_css) option
When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:
div.dokuwiki div.tags { border-top: 2px dotted __border__; font-size: 95%; text-align: right; /* clear: both; */ }
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10
You need to add copy of the existing tag pattern, and modify it to
- syntax/tag.php
$this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag'); //e.g. Spanish: $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers
Is there a way to group pages by the first letter of their name or header?
Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list
No.
Collapsible outline of all tags?
My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21
—
I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx
Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.
For bugs or feature requests, there is the bug tracker linked here : Bug tracker.
This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.
If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?
Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
- Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
- Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
- In most of my installation it works, in some not… clueless!
- How to sort the taglist (count>+) alphabetical?
My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02
Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks
Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02
Blank pages
I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(
All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(
I am using Debian Wheezy and I am having the same issue.
»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V
Nothing was found.
Same here, get a Nothing was found page.
(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.
SEO meta keywords
Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00
Sorting the {{count>}} results
Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42
This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan
In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim
Unorderd List of all tags?
Is there a way to gen an unorderd list of all tags, similar as
| Tag | # |
|---|---|
| 临汾文脉 | 1 |
| 霍州文史 | 1 |
| 文史广告 | 1 |
| 隰县 | 1 |
| 乡宁 | 1 |
| 乡宁文史 | 1 |
| 襄汾文史 | 1 |
, but without table and occurrences?
Filtering the list of Tags?
Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.
Add "*" to list all the tags under a tag namespace?
I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use
{{topic> ns1:*}}
to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28
—
Columns?
2024-12-23
Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.
Count Table Columns
2025-05-01
I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.
It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.
Exclude subnamespaces
I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?
2026-2-5 16:38:34
Blog Plugin
—- plugin —-
description: Use DokuWiki as blogging tool
author : Dokufreaks (previous author: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner)
email : freaks@dokuwiki.org
type : syntax, action, helper
lastupdate : 2023-10-24
compatible : Librarian, Kaos, Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum
depends : include, pagelist
conflicts :
similar : blogtng, miniblog
tags : blog, news
downloadurl: https://github.com/dokufreaks/plugin-blog/archive/master.zip
bugtracker : https://github.com/dokufreaks/plugin-blog/issues
sourcerepo : https://github.com/dokufreaks/plugin-blog
Description
The Blog Plugin makes blogs in your wiki easily possible. The blog component shows the latest entries (pages) from a namespace in reverse chronological order. In this new version, the creation date is the sort key – no longer the date of the last non-minor modification as in previous versions. The archive component lists all entries that were written (created) in the given month.
Installation
| Download | plugin-blog.tgz |
|---|---|
| BundleHub | Configure your own DokuWiki blogsuite install package, consisting of all mandatory plugins plus any optional features you want to include: BlogSuite BundleHub Site seems to be down for sime time, here is the archived version if you want to see possible optional plugins & features. |
| Tips | If you intend to use this plugin be sure to take a look at the blogging tips page |
Syntax
Blog
| [namespace] | namespace for the blog; subspaces will be searched as well; * is the whole wiki, . is the same namespace as the page lies in | optional; default is the blog namespace set in the configuration |
|---|---|---|
| [number] | number of entries to show per page | optional; default is 5 |
| [flags] | flags are delimited by & | |
| all Include plugin flags are supported | optional | |
Form placement: topform/bottomform/noform | optional, default is topform |
|
Custom new-entry form title: newentrytitle=Custom title | optional, can also be set as a configuration option | |
Hide paging controls: nopagingcontrols | optional |
This includes a specified number of most recent blog entries from the given namespace into the current page. Below the entries a link to the page (permalink), the author, the creation date and the number of comments are shown. Link, author, date and comments info can be hidden. At the end of the blog a link to older entries lets you navigate in the history of the blog. At the very end, if you have enough rights to create new pages, a form for new blog entries is displayed.
Note that when the page with the blog syntax is in the specified namespace, content my be shown twice. At some point, the loop will be detected and stopped. You should therefore make sure that either the page with the listing is in a different namespace or use the excluded_pages-option to explicitly exclude the blog page from the blog listing.
Archive
| [namespace] | the namespace for which you want an archive list; * is the whole wiki, . is the same namespace as the page lies in | optional; default is the namespace specified in the configuration |
|---|---|---|
| [month] | the month for the archive list in YYYY-MM format; * for all pages | required |
| [flags] | pagelist flags delimited by &, see flags | optional |
| [username] | username of an author | optional |
Shows a table with all pages of the given namespace that were created in the specified month.
Creates an automatic archive.
Configuration and Settings
The blog plugin can be configured using the DokuWiki configuration manager available in the admin menu.
namespace | The default namespace which is used if no namespace was given in the syntax |
|---|---|
formposition | You can choose to display the new entry form either above or below the blog entries |
newentrytitle | Set a custom title for all new entry forms. This can also be set on individual blog forms. |
dateprefix | A date prefix that automatically gets added to pages created with the new entry form. You can use the options from the strftime PHP function; namespace separators work as well, e.g. %Y:%m%d |
sortkey | Defines how the blog entries are sorted. Available options are creation date, modification date, page name, page ID and page title (first headline) |
sortorder | Sort the blog entries ascending/descending |
excluded_pages | Exclude certain pages from the blog listing. Requires a regular expression. Use for example !(^|:)start$! in order to exclude start pages from all blog listings. To exclude both start and rightsidebar directly below :blog use !(^|:)blog:(start|rightsidebar)$! |
showhistogram | Display a histogram in normal archive mode (not for autoarchive) |
max_months | Maximum number of months to show in the histogram |
histogram_height | Height of the histogram (in pixels) |
Changes
* 2013-10-20: Translation updates, fix cache handling for empty blog listings
* 2013-03-27: Better cache handling for the archive syntax
- the syntax that lists everything till now correctly updates the cache now whenever a page is changed or a comment or linkback is added.
- the cache is not used anymore when it contains an archive listing with a page that the current user can't access. The excluded pages won't be included again automatically unless the cache expires for other reasons, the
~~NOCACHE~~macro can be used if this is needed.
Development
Change Log
- Merge pull request #126 from dokuwiki-translate/lang_update_848_17143… (2024/05/01 23:45)
- translation update (2024/04/29 14:20)
- Version upped (2023/10/25 05:50)
- Merge pull request #121 from fiwswe/fix_issue_120 (2023/10/25 01:51)
- Rename constructor (2023/10/24 18:10)
- Merge pull request #118 from dokuwiki-translate/lang_update_564_16764… (2023/02/17 03:25)
- translation update (2023/02/15 08:35)
- Merge pull request #117 from dokuwiki-translate/lang_update_551_16745… (2023/01/25 04:45)
Bugs / Feature Requests
Please report bugs or feature requests at the Bug tracker.
FAQ
Please also have a look at the blogging tips page!
My dates are shown wrong. What can I do?
Make sure you run the latest version of all required plugins and DokuWiki.
Is it possible to change the way the date is displayed?
Yes, the plugin uses the dformat option to format the date.
How can I alter the date of a blog post?
You can use the meta plugin to manually set the creation date (and modification date) in the page source, then select the modification date in the blog plugins order setting. An alternative solution would be to alter the timestamps of the created files.
Is it possible to show table of contents?
The table of contents is shown automatically (depending on the settings in DokuWiki itself) from version 2013-02-07 on.
The header is always a link to the page even though it's disabled in the include plugin settings
The blog plugin assumes that in the context of a blog the header should be a link. However from version 2013-02-26 on it is possible to disable this behavior by using the nolink-flag, the blog plugin now only sets a default without overriding the nolink flag.
Is it possible to show just the first lines of each post with a 'Read more' link to view the full post?
I think I solved myself.
In the blog mark, use the following flags
This will work if you add an H2 header (in the full post) where you want to make appear the 'Read more' link.
If you don't need or want an H2 header in your post, you can add a empty H2 header, just as a delimiter for the text you want to show in the Blog's headlines
the excluded_pages does not work
In the blog mark ,use the following flags
Include Plugin
—- plugin —- description: Include another wiki page into the current one author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, helper lastupdate : 2025-07-22 updatemessage: Since the release of June 2025, minimal PHP 8 is required. compatible : Greebo, Frusterick Manners, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : conflicts : mediasyntax, PhotoGallery similar : wst tags : include, embed
downloadurl: https://github.com/dokufreaks/plugin-include/tarball/master bugtracker : https://github.com/dokufreaks/plugin-include/issues sourcerepo : https://github.com/dokufreaks/plugin-include/ donationurl:
The 2018-11-29 release fixes a security issue where ACLs were ignored for pages in namespace includes with DokuWiki version Greebo. If you rely on ACL checks in namespace includes or allow edits from users who must not see all pages, please upgrade ASAP!
This is a handy plugin with which you can include another wiki page into the current one. Just including certain sections of a page or even whole namespaces is supported, too.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
If you need support for older version of DokuWiki you can try the 2009-11-27 version of the include plugin, but please note that this old version has known bugs. If you need support for older versions of DokuWiki in the current include plugin version please open a feature request in the issue tracker.
Examples
{{page>wiki:syntax#Tables}} will include the section about tables of the syntax page.
{{namespace>project_foo}} will include all pages in the project_foo namespace.
{{page>blog:mypage&tags&comments}} will include the page blog:mypage and show the tags from the tag plugin and the number of comments from the discussion plugin. Both plugins need to be installed for this example.
{{tagtopic>testtag}} will include all pages with the tag testtag, the tag plugin needs to be installed for this example.
Syntax
The plugin offers four syntaxes, {{page>...}} , {{section>...}} , {{namespace>...}} and {{tagtopic>...}}.
Section is aimed more at including sections, page at including whole pages and namespace at including whole namespaces. Tagtopic includes all pages with a tagtopic tag.
{{page>[id]&[flags]}}
{{section>[id]#[section]&[flags]}}
{{namespace>[namespace]#[section]&[flags]}}
{{tagtopic>[tag]&[flags]}}
| [id] | page ID of the page to include; some macros are possible; shortcuts are resolved (:, ., ..) | required |
|---|---|---|
| [section] | limits the included page to a specific section and its subsections | optional; default is the whole page , this can be used with namespace (if matches) |
| [tag] | include pages with tag topic tag, requires tag | required |
| [flags] | flags delimited by &, see flags | optional |
Configuration and Flags
The plugin can be configured in the DokuWiki configuration manager available in the admin menu. These settings also affect the blog plugin which uses the include plugin to generate the blog page. For most settings there are flags that allow to override the setting. Some features are only available as flag.
| Configuration option | Flags | Description |
|---|---|---|
noheader | noheader/ (show)header | Don't display the header of the inserted section |
firstseconly | firstsec(tion)only/ fullpage | Display only the first section of the included page |
readmore | readmore/noreadmore | Show “read more” link in case of firstsection only |
showtaglogos | - | Show/hide an image for the first tag (if the page has tags) |
showfooter | footer/nofooter | Show/hide page footer below the included page |
showlink | link/nolink | Makes the first headline of a included page/section a link to the included page/section |
showpermalink | permalink/ nopermalink | Show/hide a permalink to the included page in the page footer |
showdate | date/nodate | Show/hide creation date of the page in the page footer |
showmdate | mdate/nomdate | Show/hide modification date of the page in the page footer |
showuser | user/nouser | Show/hide user name of the page creator in the page footer |
showcomments | comments/nocomments | Show/hide number of comments in the page footer (requires the discussion plugin) |
showlinkbacks | linkbacks/nolinkbacks | Show/hide number of linkbacks in the page footer (requires the linkback or backlinks plugin) |
showtags | tags/notags | Show/hide tags in the page footer (requires the tag plugin) |
showeditbtn | editbtn or editbutton/noeditbtn or noeditbutton | Show/hide edit buttons (section edit buttons, edit button below the included page) |
doredirect | redirect/noredirect | Redirect back to original page after an edit |
usernamespace | - | Namespace for user pages (see showuser configuration) (default user) |
doindent | indent/noindent | Indent included pages relative to the section of the page they get included in |
linkonly | linkonly/nolinkonly or include_content | Display only a link instead of the whole page content |
title | title/notitle | Show the title instead of the page id |
pageexists | pageexists/ nopageexists | Only list page ids of existing pages (see existlink) |
| - | existlink | Display a link and do so only if page page-id exists (combination of linkonly and pageexists) |
parlink | parlink/noparlink | (Don't) put the link into a paragraph environment (for inline lists) |
order | order=OPTION | Ordering criteria for namespace includes, possible options: page ID (id), title (title), date created (created), date modified (modified), indexmenu sort order (indexmenu), custom sort order using the {{include_n>[number]}} on the pages that are included similar to the indexmenu tags (custom). |
rsort | rsort/sort | Reverse the sort order in namespace includes. |
depth | depth=DEPTH | The maximum depth of subnamespaces of which pages are included in namespace includes, default is 1 for only the specified namespace, 0 is for unlimited depth. |
| - | inline | Don't close/open sections when including a page. This flag should be used when the include syntax is used inside other syntax elements like lists or tables or inside other plugin syntax. |
| - | beforeeach=ENTITY/ aftereach=ENTITY | Display an entity before/after each included page. The entity is printed outside the section/include environment, this is mainly for adding custom HTML code (when the text isn't recognized as entity it is directly displayed but escaped so you can't directly use HTML code here). |
safeindex | - | Don't index metadata of included pages that are non-public. This can cause problems with other plugins that use the metadata index and can be safely disabled in wikis where the permissions of the included pages match the permissions of the parent pages. |
| - | exclude=/REGEX/ | Regular expression to exclude certain pages, will match on full page ID. E.g. to exclude ns:page_name use /ns:page_name/ as value. Use a regex tester to debug complicated patterns. |
Examples:
{{page>concept&firstseconly&footer}}
{{page>mypage&noindent}}
{{namespace>myns&order=modified}}
{{namespace>myns&exclude=/myns:subns:.+|myns:page/}}
Macros
Simple macros are possible to serve a page on a per user or per date base. These are:
| @USER@ | username |
|---|---|
| @NAME@ | full name of user |
| @GROUP@ | first group the user belongs to |
| @YEAR@ | 4-digit year |
| @MONTH@ | 2-digit month |
| @WEEK@ | 2-digit ISO week number |
| @DAY@ | 2-digit day |
| @DATE<expr>@ | use a calculated date instead of today in date macros |
<expr> in @DATE<expr>@ can be one of:
| PYEAR | previous year |
|---|---|
| NYEAR | next year |
| PMONTH | previous month |
| NMONTH | next month |
| PWEEK | previous week |
| NWEEK | next week |
| YESTERDAY | yesterday's date |
| TOMORROW | tomorrow's date |
Examples:
{{page>@MONTH@:@DAY@:birthdays}}
includes the page birthdays in namespace <month>:<day>: eg. 10:15: birthdays for the 15th of october.
{{page>@USER@:message}}
includes the page message from the namespace <user> of the logged in user
{{page>foo@DATENWEEK@@YEAR@:@WEEK@}}
includes the page <weekno> from the namespace foo<year> with next week's date e.g. foo2012:01 for the 27th of december 2011
Demo
There is currently no demo site available.
Use of the plugin is shown in this video here: https://www.youtube.com/watch?v=6RO8TSZBedU&t=8m47s
Video not available (2021-03-20)
Development
Change Log
- Version upped (2025/07/23 07:04)
- fix tag for minimum php version (2025/07/23 03:38)
- Version upped (2025/07/05 07:04)
- Merge pull request #363 from dokufreaks/tests (2025/07/05 01:49)
- replace strftime use with dformat (2025/07/04 23:20)
- use newer DokuWiki test workflow (2025/07/04 23:15)
- Merge pull request #360 from dokuwiki-translate/lang_update_1151_1748… (2025/07/04 23:10)
- add minimum php requirement to plugin.info.txt (2025/07/04 23:05)
Bugs / Feature Requests
Please report bugs or feature requests at the Bug tracker.
Known Bugs and Issues
There are currently no known bugs and issues for which no workarounds exist (see FAQ).
FAQ
The include plugin breaks the wrap and folded (and similar) plugins when used inside them
This can be solved by using the inline flag of the include plugin. This mode strips all section from the included page and should solve issues with invalid HTML and thus no longer working wrap and folded plugins. This also solves problems with invalid HTML code when the include plugin is used inside tables or other syntax environments. When the page contains headers this might look strange depending on the template.
Addendum
If you are using the Wrap Plugin on both the page you are using the {{section>target&inline}} from and the page target, you need to make sure any pair of WRAP tags on target are either entirely within the included section or entirely outside of the section. For instance, including the FOO section into another page might break the other page:
<WRAP right 35%> ==== FOO ==== Content goes here </WRAP> ==== BAR ====
FOO contains the </WRAP> end-tag, but not a corresponding start-tag. Thus, if the use of include is within a WRAPed block, that WRAP block will be ended early.
The simplest solution is to never use WRAP on both pages, only on included pages or only on pages that include others – however, that's not very realistic or useful. The other (somewhat brittle) solution is to make the section on target end before the WRAP close tag. You can do this by inserting a dokuwiki section header (at the same level) before the close tag, but after the section's content. However, I've not been able to determine if this is an intended behavior of dokuwiki, or if this is undocumented behavior and therefore subject to change at any time.
So, to make the above example work correctly, it should look like this:
<WRAP right 35%> ==== BAZ ==== Content goes here ==== ==== </WRAP> ==== QUX ====
Now {{section>whatever#BAZ}} will work fine.
Is it possible to include the same page twice?
Yes, this is possible since the 2011-01-01 version and hasn't been possible before. But you can't include the same page again inside a page in order to avoid endless recursion (and things like page1 > page2 > page1 doesn't work, too).
Does the include plugin respect ACLs of the included pages?
The include plugin tries its best to respect ACLs and it should work under normal circumstances. Whenever the view permissions of included pages change the cache is purged and the included pages are adapted according to the current permissions. Due to limitations in the caching system this might fail if a page is accessed very frequently with changing permissions. If this is an issue for you you can disable caching of the affected pages using the ~~NOCACHE~~ syntax. As always there is no guarantee that everything works as expected, please test if everything works and report a bug if you should notice anything unexpected.
As of version 2012-11-24, there is a new security feature called safeindex that is turned on by default, it's purpose is to prevent the indexer from indexing metadata of included pages that aren't public. That way links that are in protected pages won't be visible as link of a public page in the backlinks list.
Why does the include plugin first close the previous section and opens it again afterwards?
This is done because if there are headers in the included page they will close the current section. As the include plugin has its own container div this would produce strange results and possibly invalid HTML. You can use the inline flag in order to avoid this (but then also all sections of the included page are removed).
Has the include plugin feature XYZ/when will you implement XYZ?
The include plugin has many feature and is very flexible and I'm willing to add more features if they fit in the general purpose of the include plugin. However there is no guarantee that I will implement a certain feature at a certain time, this depends completely on my available time and my mood. You can add your wishes to the issue tracker.
How to avoid inclusion of whole page content if section does not exist?
Adding the flag firstsectiononly could be one solution. At least in regard to avoiding very large content being displayed. Adding a header at the source page and using tools like the hiddenheader might solve things at the source page, but in this case seems to conflict and break certain include flag-tasks.
Discussion
Please don't report any bugs or feature requests here but instead use the bug tracker!
If you miss a comment you've created please have a look at the FAQ section and the issue tracker, I might have moved them there, if you can't find a bug report anymore that bug should be solved, please try the current version and report it again if it still doesn't work.
Discussions in DW-forum
- include plugin: development in direction to use it as a kind database tool, feature inspirations.
User comments
footer.php:
// author if ($flags['user']) { $author = $meta['creator']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$author);
replaced to include the real user name in the link:
// author if ($flags['user']) { $author = $meta['creator']; $login = $meta["last_change"]['user']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$login);
User Namespace
Hi, I'm using userpagecreate plugin's to create user's namespace instead of user's page. Then, to link correctly the include's page with his last member who edit it, i rewrite the previous lines like this :
if ($flags['user']) { $login = $meta['last_change']['user']; $author = $auth->getUserData($login); $author = $author['name']; if ($author && $login) { if (strstr($this->getConf('usernamespace'), '@USER@')) { $userpage = cleanID(str_replace('@USER@', $login, $this->getConf('usernamespace'))); } else { $userpage = cleanID($this->getConf('usernamespace').':'.$login); } resolve_pageid(getNS($ID), $userpage, $exists); $class = ($exists ? 'wikilink1' : 'wikilink2'); $link = array( 'url' => wl($userpage), 'title' => $userpage, 'name' => hsc($author), 'target' => $conf['target']['wiki'], 'class' => $class.' url fn', 'pre' => '<span class="vcard author">', 'suf' => '</span>', ); $xhtml[] = $renderer->_formatLink($link); } }
and change my conf into :
$conf['plugin']['include']['usernamespace'] = 'user:@USER@:start';
standard configuration still works.
$conf['plugin']['include']['usernamespace'] = 'user:';
If the @USER@ wildcard is using, replace it by the login name, otherwise, use the standard include's plugin rule.
— garlik 2011/10/24 14:10
— garlik 2011/11/07 11:32 - Summmary : Update the code. will display the right modif author.
showlink vs link flag
When including a page, the flag to make the first heading a link is link, not showlink. This confused me at first because I assumed the flags would have the same names as the configuration options. Example (displays the first section of a product page, with the page heading as a link):
{{page>products:sample&firstseconly&link}}
Controlling header size in included pages
By default, the headers in included pages start one level lower than the last header in the current page. For example, if the section before the include is a level-three header, then a level-6 header in the included page will become a wimply little level-2.
If you want higher-level headers, you can trick the plugin by putting an empty header above the include. In the following example, a level-6 header in the included page will show up as level-5:
=== Some Section ===
Stuff
====== ======
{{page>somepage}}
- Zioth
Including a paragraph or excerpt from a page
See the Hidden Header plugin. -Zioth
2012-01-25 "Angua"
Just tested with the current version and it works for me. — renux 2012/02/10 12:44
Include from same page?
Using it on my knowledge wiki and it works well. However, I'd like to be able to include a section from the current page - for use with the ItemTable Plugin (along with something to hide the inline text of course. — Julian Knight 2012-03-23
Does it still work? Can't make it on my wiki page.
— Piotr 2017-10-04
Align Feature
It'll be great to be able to align included pages. Because a lot of people are using this feature for infobox purposes and some would love to be able to control the alignment of the
{{page>people:obama}}
using the core syntax by adding spaces before of after the syntax.
— James 2014-05-13 20:38
Exclude Feature
It would be nice, if there would be an “exclude” option. When we use the namespace feature, we don't want certain pages in the included in the resulting page: for example exclude “sidebar” or “start”.
— Manuel 2014-10-30 02:42
I would appreciate that feature too.
— Florian 2015-07-18 18:43
Same here, the possibility of the exclusion of listed namespaces would be much appreciated.
— Tommy 2016-2-19 21:18
I totally agree.
—- Chris 2016-2-21 09:12
blog plugin supports Exclude Feature
— HsinTang 2016-07-26
I created a PR for an exclude option! Testing or adding tests would be appreciated.
— sleeping 2020-04-11 07:57
The exclude flag has been merged!
— sleeping 2020-04-16 19:28
Empty Section
We are using the plugin a lot for technical documentation. If we include a named section (#title), and that section doesn't exist, the plugin includes the whole page. This really annoying. Would it be possible to change the behavior so that if a section doesn't exist it doesn't include anything (the same as when a page doesn't exist), please?
— Simon 2015-02-02 14:50
Just thought of asking about this issue. Is there any possibility to avoid that? — Samana Johann 2018-08-20 19:45
No Other data
I love this plugin but I have a question. How do I completely remove all other data included, such as user, mdate, etc.? If I do them as individual flags I still see the grey bar under the included content. There must be a flag that just excludes all the content, right? Am I just missing it somehow?
Thanks!
— Max 2017.03.21
Hi there, I think you are looking for
{{page>ID&nouser&nodate&nofooter}}
Namespace lists using &linkonly and &beforeeach/&aftereach
I've been trying to format a list of pages generated using namespace> with &linkonly - ideally as a simple unordered list. I'm adding this paragraph to help others searching for help because it took me several hours to find out that it is not possible and this is a known issue logged as a feature request.
— vt306 2017.03.29
Thanks to Michael Hamann for the advice. The pagequery plugin is the solution for this.
— vt306 2017.04.06
Option to pass revision of main page to includes pages
We are currently using DokuWiki for technical documentation. Within DokuWiki we use the 'date_at' function to go back to an old revision to see which version of the page a customer recieved. It would be very usefull if the included pages would honour the revision of the main page. To clarify: if the main page is shown at a specific revision, the included pages should also be shown at the last revision before the date of the main page. Would something like that be possible to incorporate?
Thanks in advance! Ruud
Translations
If it is of use, a paticular Translation of the Plugin's info page into German can be taken from here. — Samana Johann 2018-08-20 12:11
Display search results on a page?
Hi, I was wondering if it is possible to display the search result of a term or phrase on a page?
- OYMYO
Passing parameters/arguments
I think it would be cool if this plugin supported options/arguments like in MediaWiki.
Something like this:
- page1.txt
Test by {{{1}}}
- page2.txt
{{page>:page1|Me}}
And page2 would be parsed into:
Test by Me
— hasha2982 2020-08-19 17:12
Sorry, didn't know about the Templater Plugin — hasha2982 2020-08-19 17:25
2026-2-5 19:15:53
Imagelink Plugin
—- plugin —- description: Create nice navigation links with image and title author : peterfromearth email : coder@peterfromearth.de type : syntax lastupdate : 2020-02-29 compatible : depends : conflicts : similar : tags : link image navigation
downloadurl: https://github.com/peterfromearth/dokuwiki-plugin-imagelink/zipball/master bugtracker : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/issues sourcerepo : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/ donationurl:
screenshot_img : https://raw.githubusercontent.com/peterfromearth/dokuwiki-plugin-imagelink/master/example/screenshot.png
Installation
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Examples/Usage
See the plugin in action here.
<imagelink?title=Impressionen>
[[:impressionen|{{ :intro:links:getreide.jpg?linkonly |}}]]
</imagelink>
Syntax
<imagelink?title="TITLE NAME">
[[...|{{...}}]]
</imagelink>
Use image with links see image_links
Configuration and Settings
Development
Change Log
- version 2020-02-29 (2020/03/01 01:59)
- Initial commit (2020/03/01 01:56)
Known Bugs and Issues
ToDo/Wish List
FAQ
Discussion
2026-2-5 19:15:08
Tag Plugin
—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing
downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag
Description
The Tag Plugin lets you assign category tags to wiki pages.
Components
Tag
Add a tag to the page
{{tag>[list of tags]}}
| [list of tags] | a space separated list of tags that describe the content of the current page | required |
|---|
Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.
Examples:
{{tag>tag1 tag2 tag3}}- with namespaces:
{{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}} - multiple word tags:
{{tag>tag1_with_multiple_words tag2 tag3_part}} {{tag>"tag with spaces" tag2}}– Within quotes you can use spaces. Tag is stored internally with underscores_.
Topic
List all pages with given tags.
{{topic>[tag]&[flags]}}
| [tag] | the category tag for which you want a list of pages | required |
|---|---|---|
| [flags] | pagelist flags delimited by &, see flags | optional |
This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:
- If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
+creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the+(AND), so each listed page must have this tag.-removes all pages tagged with the given tag from the list of already found pages (NOT).
Example:
{{topic>tag1 -tag2}}– Lists all pages tagged with tag1 but not with tag2.{{topic>tag1 +tag2}}– Lists all pages tagged with tag1 and tag2.{{topic>tag1 tag2}}– Lists all pages tagged with either tag1 or tag2 or both.{{topic>ns1?tag1 tag2}}– List all pages inside namespace ns1 tagged with either tag1 or tag2{{topic>.?tag1 tag2}}– List all pages inside the current namespace tagged with either tag1 or tag2{{topic>tag1 tag2 tag3&nodate&desc&sort}}(Adding pagelist options to change the design)
Searchtags
Search form for filtering by tag.
{{searchtags&[flags]}}
| [flags] | pagelist flags delimited by &, see flags | optional |
|---|
This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.
This is a great feature which you should not miss. Please add a screenshot of this cool feature.
And you might check out TagFilter Plugin for similar purpose but in different scenarios.
Example:
{{searchtags}}– The basic syntax{{searchtags&nodate&desc&sort}}– with pagelist options to change the design{{searchtags&nonsform}}– hide the namespace selector
Count
Shows a list of tags and its number of occurrences.
{{count>[tag][&namespace]}}
| [tags] | The tag for which you want to list the occurrence. Multiple tags separated by spaces. | optional |
|---|---|---|
| &[namespaces] | Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. | optional |
This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.
Example:
{{count>+}}– List all tags with related occurrences.{{count>tag1 tag2}}– List the occurrence of tag1 and tag2.{{count>tag1 tag2 tag3&. ns1 ns2}}– List all occurrences for the given tags inside the namespaces (the dot.specifies the root namespace){{count>+&ns1 ns2}}– List all tags inns1andns2.
Tagpage
Make link to the tag list
{{tagpage>[tag][&dynamic][|title]}}
This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.
Example:
{{tagpage>test_foo}}– The basic syntax{{tagpage>test_foo&dynamic}}– A link with dynamic link color{{tagpage>test_foo|my title}}– A link with custom title{{tagpage>test_foo&dynamic|my | title}}– A link with dynamic link color and custom title (that can also contain|)
Configuration
The plugin can be configured with the DokuWiki configuration manager available in the admin menu.
namespace | Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag |
|---|---|
sortkey | Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title |
sortorder | Sort order of the topic overview (ascending or descending) |
pagelist_flags | Comma separated Flags of the pagelist plugin which is used to display the topic overview |
toolbar_icon | Show icon in page editor toolbar to add tags. |
list_tags_of_subns | When counting tags in specified namespaces include also tags in subnamespaces. |
tags_list_css | Choose tags list style between standard or optimised for top of page position. |
Tagindex Rebuild
If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.
Demo / Screenshots
Changes
- 2014-02-16
- New and updated translations
- Fixed tag searching with out of date indexes and numbers
- Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
- 2013-04-14
- New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
- Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
- In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
- The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
- Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
- 2013-04-05:
- New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
- Removed the Technorati ping feature as Technorati is no longer using any pings
- zh-tw translation updated
- 2013-02-15:
fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
- 2012-11-25
- New searchtags feature, displays a search form for the topic syntax
- Fix section edit button styles for the new dokuwiki template
- In the topic syntax now really only namespaces and not pages are matched by namespace parameter
- When sorting by the title the case is ignored now
- Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
- 2012-08-24
- The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
- Tags are now normalized in the same way as page ids are normalized
Development changelog:
- Merge pull request #257 from dokuwiki-translate/lang_update_749_17017… (2023/12/06 04:53)
- translation update (2023/12/05 22:20)
- update plugin.info.txt (2023/10/18 04:40)
- Make selector less specific by using .dokuwiki (2023/10/18 04:39)
- Version upped (2023/09/12 05:50)
- Merge pull request #254 from Miro-Collas/master (2023/09/11 23:31)
- Another minor fix (2023/09/11 07:10)
- Miro bugfix (2023/09/11 07:04)
Sites using this Plugin
Feel free to add yours here:
- http://tokeek.de (German)
- Prinz Eisenherz Lexikon (German)
- Psiconauti (Italian)
- Blog Fred Radeff (French)
FAQ
How to use tags which consist of multiple words?
Just use an “_”, it gets automatically replaced by a “ ” i.e.:
{{tag>tag_with_multiple_words}}
Also, quotes seem to work:
{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work
Let's use one of the example websites.
If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess
This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use
RewriteCond %{REQUEST_URI} !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$ tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags
This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.
- action.php
function _handle_keywords(&$data) { global $ID; // Fetch tags for the page; stop proceeding when no tags specified $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER); if(is_null($tags)) return; // Replace underscores with blanks foreach($data->data['meta'] as &$meta) { if($meta['name'] == 'keywords') { $meta['content'] = str_replace('_', ' ', $meta['content']); // add extra styling $t = explode(',', $meta['content']); if(in_array('deprecated', $t)) { $data->data['style'][] = array('type' => 'text/css', '_data' => '.dokuwiki .page {background-color: red;}'); } } } }
Customizing the breadcrumbs
If you add at pagelist/helper.php
function tpl_youarehere2_help($id){ $result = ''; global $conf; global $ID; global $lang; // check if enabled if(!$conf['youarehere']) return false; $parts = explode(':', $id); $count = count($parts); // always print the startpage $result .= html_wikilink(':'.$conf['start']); // print intermediate namespace links $part = ''; for($i=0; $i<$count - 1; $i++){ $part .= $parts[$i].':'; $page = $part; if ($page == $conf['start']) continue; // Skip startpage // output $result .= ' » '.html_wikilink($page); } // print current page, skipping start page, skipping for namespace index resolve_pageid('',$page,$exists); if(isset($page) && $page==$part.$parts[$i]) return $result; $page = $part.$parts[$i]; if($page == $conf['start']) return $result; $result .= ' » '.html_wikilink($page); return $result; } function tpl_youarehere2($id) { $str = $this->tpl_youarehere2_help($id); $pos = strrpos($str , '»'); if ($pos == -1) return $str; return substr($str, 0, $pos); } function addPage2($page) { $id = $page['id']; if (!$id) return false; $this->page = $page; $this->_meta = NULL; // priority and draft if (!isset($this->page['draft'])) { $this->page['draft'] = ($this->_getMeta('type') == 'draft'); } $class = ''; if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' '; if ($this->page['draft']) $class .= 'draft '; if ($this->page['class']) $class .= $this->page['class']; if(!empty($class)) $class = ' class="' . $class . '"'; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->_pageCell($id); if ($this->column['date']) $this->_dateCell(); if ($this->column['user']) $this->_userCell(); if ($this->column['desc']) $this->_descCell(); foreach ($this->plugins as $plug => $col) { if ($this->column[$col]) $this->_pluginCell($plug, $col, $id); } $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">'; $this->doc .= $this->tpl_youarehere2($id); $this->doc .='</td>'.DOKU_LF; $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; return true; }
And change tag/action.php
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage($page); }
to
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage2($page); }
After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.
Bad appearance when displaying tags at top of page
Integrated to main code (see tags_list_css) option
When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:
div.dokuwiki div.tags { border-top: 2px dotted __border__; font-size: 95%; text-align: right; /* clear: both; */ }
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10
You need to add copy of the existing tag pattern, and modify it to
- syntax/tag.php
$this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag'); //e.g. Spanish: $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers
Is there a way to group pages by the first letter of their name or header?
Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list
No.
Collapsible outline of all tags?
My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21
—
I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx
Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.
For bugs or feature requests, there is the bug tracker linked here : Bug tracker.
This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.
If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?
Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
- Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
- Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
- In most of my installation it works, in some not… clueless!
- How to sort the taglist (count>+) alphabetical?
My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02
Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks
Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02
Blank pages
I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(
All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(
I am using Debian Wheezy and I am having the same issue.
»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V
Nothing was found.
Same here, get a Nothing was found page.
(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.
SEO meta keywords
Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00
Sorting the {{count>}} results
Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42
This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan
In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim
Unorderd List of all tags?
Is there a way to gen an unorderd list of all tags, similar as
| Tag | # |
|---|---|
| 临汾文脉 | 1 |
| 霍州文史 | 1 |
| 文史广告 | 1 |
| 隰县 | 1 |
| 乡宁 | 1 |
| 乡宁文史 | 1 |
| 襄汾文史 | 1 |
, but without table and occurrences?
Filtering the list of Tags?
Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.
Add "*" to list all the tags under a tag namespace?
I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use
{{topic> ns1:*}}
to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28
—
Columns?
2024-12-23
Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.
Count Table Columns
2025-05-01
I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.
It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.
Exclude subnamespaces
I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?
2026-2-5 16:38:34
====== Add New Page Plugin
Compatible with DokuWiki
2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection
Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere
Tagged with button, create, form
Needed for autoincludeindex
By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).
The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.
The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.
The form submit button is disabled if there is no text in the title field.
Edit
Usage
Put
anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.
Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.
with configuration option “Hide namespace selection” enabled.
with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:
Or, to specify a namespace:
Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).
Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,
will create a new namespace within the foo namespace.
Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification
When used together with the autopage option to hide the input field, a daily page can be created with a single button click:
Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.
General syntax:
?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:
overwrite the default hide setting
custom namespace exclusion and hide root
disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub
Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option
Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.
Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:
Use the newtpl template
Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one
The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.
Edit
Multiple occurences
The
syntax may be added multiple times on the same page.
Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:
<?php echo p_render('xhtml',p_get_instructions('
'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.
Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:
Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?
This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?
Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?
Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development
2026-2-5 15:54:19
Include Plugin
—- plugin —- description: Include another wiki page into the current one author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, helper lastupdate : 2025-07-22 updatemessage: Since the release of June 2025, minimal PHP 8 is required. compatible : Greebo, Frusterick Manners, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : conflicts : mediasyntax, PhotoGallery similar : wst tags : include, embed
downloadurl: https://github.com/dokufreaks/plugin-include/tarball/master bugtracker : https://github.com/dokufreaks/plugin-include/issues sourcerepo : https://github.com/dokufreaks/plugin-include/ donationurl:
The 2018-11-29 release fixes a security issue where ACLs were ignored for pages in namespace includes with DokuWiki version Greebo. If you rely on ACL checks in namespace includes or allow edits from users who must not see all pages, please upgrade ASAP!
This is a handy plugin with which you can include another wiki page into the current one. Just including certain sections of a page or even whole namespaces is supported, too.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
If you need support for older version of DokuWiki you can try the 2009-11-27 version of the include plugin, but please note that this old version has known bugs. If you need support for older versions of DokuWiki in the current include plugin version please open a feature request in the issue tracker.
Examples
{{page>wiki:syntax#Tables}} will include the section about tables of the syntax page.
{{namespace>project_foo}} will include all pages in the project_foo namespace.
{{page>blog:mypage&tags&comments}} will include the page blog:mypage and show the tags from the tag plugin and the number of comments from the discussion plugin. Both plugins need to be installed for this example.
{{tagtopic>testtag}} will include all pages with the tag testtag, the tag plugin needs to be installed for this example.
Syntax
The plugin offers four syntaxes, {{page>...}} , {{section>...}} , {{namespace>...}} and {{tagtopic>...}}.
Section is aimed more at including sections, page at including whole pages and namespace at including whole namespaces. Tagtopic includes all pages with a tagtopic tag.
{{page>[id]&[flags]}}
{{section>[id]#[section]&[flags]}}
{{namespace>[namespace]#[section]&[flags]}}
{{tagtopic>[tag]&[flags]}}
| [id] | page ID of the page to include; some macros are possible; shortcuts are resolved (:, ., ..) | required |
|---|---|---|
| [section] | limits the included page to a specific section and its subsections | optional; default is the whole page , this can be used with namespace (if matches) |
| [tag] | include pages with tag topic tag, requires tag | required |
| [flags] | flags delimited by &, see flags | optional |
Configuration and Flags
The plugin can be configured in the DokuWiki configuration manager available in the admin menu. These settings also affect the blog plugin which uses the include plugin to generate the blog page. For most settings there are flags that allow to override the setting. Some features are only available as flag.
| Configuration option | Flags | Description |
|---|---|---|
noheader | noheader/ (show)header | Don't display the header of the inserted section |
firstseconly | firstsec(tion)only/ fullpage | Display only the first section of the included page |
readmore | readmore/noreadmore | Show “read more” link in case of firstsection only |
showtaglogos | - | Show/hide an image for the first tag (if the page has tags) |
showfooter | footer/nofooter | Show/hide page footer below the included page |
showlink | link/nolink | Makes the first headline of a included page/section a link to the included page/section |
showpermalink | permalink/ nopermalink | Show/hide a permalink to the included page in the page footer |
showdate | date/nodate | Show/hide creation date of the page in the page footer |
showmdate | mdate/nomdate | Show/hide modification date of the page in the page footer |
showuser | user/nouser | Show/hide user name of the page creator in the page footer |
showcomments | comments/nocomments | Show/hide number of comments in the page footer (requires the discussion plugin) |
showlinkbacks | linkbacks/nolinkbacks | Show/hide number of linkbacks in the page footer (requires the linkback or backlinks plugin) |
showtags | tags/notags | Show/hide tags in the page footer (requires the tag plugin) |
showeditbtn | editbtn or editbutton/noeditbtn or noeditbutton | Show/hide edit buttons (section edit buttons, edit button below the included page) |
doredirect | redirect/noredirect | Redirect back to original page after an edit |
usernamespace | - | Namespace for user pages (see showuser configuration) (default user) |
doindent | indent/noindent | Indent included pages relative to the section of the page they get included in |
linkonly | linkonly/nolinkonly or include_content | Display only a link instead of the whole page content |
title | title/notitle | Show the title instead of the page id |
pageexists | pageexists/ nopageexists | Only list page ids of existing pages (see existlink) |
| - | existlink | Display a link and do so only if page page-id exists (combination of linkonly and pageexists) |
parlink | parlink/noparlink | (Don't) put the link into a paragraph environment (for inline lists) |
order | order=OPTION | Ordering criteria for namespace includes, possible options: page ID (id), title (title), date created (created), date modified (modified), indexmenu sort order (indexmenu), custom sort order using the {{include_n>[number]}} on the pages that are included similar to the indexmenu tags (custom). |
rsort | rsort/sort | Reverse the sort order in namespace includes. |
depth | depth=DEPTH | The maximum depth of subnamespaces of which pages are included in namespace includes, default is 1 for only the specified namespace, 0 is for unlimited depth. |
| - | inline | Don't close/open sections when including a page. This flag should be used when the include syntax is used inside other syntax elements like lists or tables or inside other plugin syntax. |
| - | beforeeach=ENTITY/ aftereach=ENTITY | Display an entity before/after each included page. The entity is printed outside the section/include environment, this is mainly for adding custom HTML code (when the text isn't recognized as entity it is directly displayed but escaped so you can't directly use HTML code here). |
safeindex | - | Don't index metadata of included pages that are non-public. This can cause problems with other plugins that use the metadata index and can be safely disabled in wikis where the permissions of the included pages match the permissions of the parent pages. |
| - | exclude=/REGEX/ | Regular expression to exclude certain pages, will match on full page ID. E.g. to exclude ns:page_name use /ns:page_name/ as value. Use a regex tester to debug complicated patterns. |
Examples:
{{page>concept&firstseconly&footer}}
{{page>mypage&noindent}}
{{namespace>myns&order=modified}}
{{namespace>myns&exclude=/myns:subns:.+|myns:page/}}
Macros
Simple macros are possible to serve a page on a per user or per date base. These are:
| @USER@ | username |
|---|---|
| @NAME@ | full name of user |
| @GROUP@ | first group the user belongs to |
| @YEAR@ | 4-digit year |
| @MONTH@ | 2-digit month |
| @WEEK@ | 2-digit ISO week number |
| @DAY@ | 2-digit day |
| @DATE<expr>@ | use a calculated date instead of today in date macros |
<expr> in @DATE<expr>@ can be one of:
| PYEAR | previous year |
|---|---|
| NYEAR | next year |
| PMONTH | previous month |
| NMONTH | next month |
| PWEEK | previous week |
| NWEEK | next week |
| YESTERDAY | yesterday's date |
| TOMORROW | tomorrow's date |
Examples:
{{page>@MONTH@:@DAY@:birthdays}}
includes the page birthdays in namespace <month>:<day>: eg. 10:15: birthdays for the 15th of october.
{{page>@USER@:message}}
includes the page message from the namespace <user> of the logged in user
{{page>foo@DATENWEEK@@YEAR@:@WEEK@}}
includes the page <weekno> from the namespace foo<year> with next week's date e.g. foo2012:01 for the 27th of december 2011
Demo
There is currently no demo site available.
Use of the plugin is shown in this video here: https://www.youtube.com/watch?v=6RO8TSZBedU&t=8m47s
Video not available (2021-03-20)
Development
Change Log
- Version upped (2025/07/23 07:04)
- fix tag for minimum php version (2025/07/23 03:38)
- Version upped (2025/07/05 07:04)
- Merge pull request #363 from dokufreaks/tests (2025/07/05 01:49)
- replace strftime use with dformat (2025/07/04 23:20)
- use newer DokuWiki test workflow (2025/07/04 23:15)
- Merge pull request #360 from dokuwiki-translate/lang_update_1151_1748… (2025/07/04 23:10)
- add minimum php requirement to plugin.info.txt (2025/07/04 23:05)
Bugs / Feature Requests
Please report bugs or feature requests at the Bug tracker.
Known Bugs and Issues
There are currently no known bugs and issues for which no workarounds exist (see FAQ).
FAQ
The include plugin breaks the wrap and folded (and similar) plugins when used inside them
This can be solved by using the inline flag of the include plugin. This mode strips all section from the included page and should solve issues with invalid HTML and thus no longer working wrap and folded plugins. This also solves problems with invalid HTML code when the include plugin is used inside tables or other syntax environments. When the page contains headers this might look strange depending on the template.
Addendum
If you are using the Wrap Plugin on both the page you are using the {{section>target&inline}} from and the page target, you need to make sure any pair of WRAP tags on target are either entirely within the included section or entirely outside of the section. For instance, including the FOO section into another page might break the other page:
<WRAP right 35%> ==== FOO ==== Content goes here </WRAP> ==== BAR ====
FOO contains the </WRAP> end-tag, but not a corresponding start-tag. Thus, if the use of include is within a WRAPed block, that WRAP block will be ended early.
The simplest solution is to never use WRAP on both pages, only on included pages or only on pages that include others – however, that's not very realistic or useful. The other (somewhat brittle) solution is to make the section on target end before the WRAP close tag. You can do this by inserting a dokuwiki section header (at the same level) before the close tag, but after the section's content. However, I've not been able to determine if this is an intended behavior of dokuwiki, or if this is undocumented behavior and therefore subject to change at any time.
So, to make the above example work correctly, it should look like this:
<WRAP right 35%> ==== BAZ ==== Content goes here ==== ==== </WRAP> ==== QUX ====
Now {{section>whatever#BAZ}} will work fine.
Is it possible to include the same page twice?
Yes, this is possible since the 2011-01-01 version and hasn't been possible before. But you can't include the same page again inside a page in order to avoid endless recursion (and things like page1 > page2 > page1 doesn't work, too).
Does the include plugin respect ACLs of the included pages?
The include plugin tries its best to respect ACLs and it should work under normal circumstances. Whenever the view permissions of included pages change the cache is purged and the included pages are adapted according to the current permissions. Due to limitations in the caching system this might fail if a page is accessed very frequently with changing permissions. If this is an issue for you you can disable caching of the affected pages using the ~~NOCACHE~~ syntax. As always there is no guarantee that everything works as expected, please test if everything works and report a bug if you should notice anything unexpected.
As of version 2012-11-24, there is a new security feature called safeindex that is turned on by default, it's purpose is to prevent the indexer from indexing metadata of included pages that aren't public. That way links that are in protected pages won't be visible as link of a public page in the backlinks list.
Why does the include plugin first close the previous section and opens it again afterwards?
This is done because if there are headers in the included page they will close the current section. As the include plugin has its own container div this would produce strange results and possibly invalid HTML. You can use the inline flag in order to avoid this (but then also all sections of the included page are removed).
Has the include plugin feature XYZ/when will you implement XYZ?
The include plugin has many feature and is very flexible and I'm willing to add more features if they fit in the general purpose of the include plugin. However there is no guarantee that I will implement a certain feature at a certain time, this depends completely on my available time and my mood. You can add your wishes to the issue tracker.
How to avoid inclusion of whole page content if section does not exist?
Adding the flag firstsectiononly could be one solution. At least in regard to avoiding very large content being displayed. Adding a header at the source page and using tools like the hiddenheader might solve things at the source page, but in this case seems to conflict and break certain include flag-tasks.
Discussion
Please don't report any bugs or feature requests here but instead use the bug tracker!
If you miss a comment you've created please have a look at the FAQ section and the issue tracker, I might have moved them there, if you can't find a bug report anymore that bug should be solved, please try the current version and report it again if it still doesn't work.
Discussions in DW-forum
- include plugin: development in direction to use it as a kind database tool, feature inspirations.
User comments
footer.php:
// author if ($flags['user']) { $author = $meta['creator']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$author);
replaced to include the real user name in the link:
// author if ($flags['user']) { $author = $meta['creator']; $login = $meta["last_change"]['user']; if ($author) { $userpage = cleanID($this->getConf('usernamespace').':'.$login);
User Namespace
Hi, I'm using userpagecreate plugin's to create user's namespace instead of user's page. Then, to link correctly the include's page with his last member who edit it, i rewrite the previous lines like this :
if ($flags['user']) { $login = $meta['last_change']['user']; $author = $auth->getUserData($login); $author = $author['name']; if ($author && $login) { if (strstr($this->getConf('usernamespace'), '@USER@')) { $userpage = cleanID(str_replace('@USER@', $login, $this->getConf('usernamespace'))); } else { $userpage = cleanID($this->getConf('usernamespace').':'.$login); } resolve_pageid(getNS($ID), $userpage, $exists); $class = ($exists ? 'wikilink1' : 'wikilink2'); $link = array( 'url' => wl($userpage), 'title' => $userpage, 'name' => hsc($author), 'target' => $conf['target']['wiki'], 'class' => $class.' url fn', 'pre' => '<span class="vcard author">', 'suf' => '</span>', ); $xhtml[] = $renderer->_formatLink($link); } }
and change my conf into :
$conf['plugin']['include']['usernamespace'] = 'user:@USER@:start';
standard configuration still works.
$conf['plugin']['include']['usernamespace'] = 'user:';
If the @USER@ wildcard is using, replace it by the login name, otherwise, use the standard include's plugin rule.
— garlik 2011/10/24 14:10
— garlik 2011/11/07 11:32 - Summmary : Update the code. will display the right modif author.
showlink vs link flag
When including a page, the flag to make the first heading a link is link, not showlink. This confused me at first because I assumed the flags would have the same names as the configuration options. Example (displays the first section of a product page, with the page heading as a link):
{{page>products:sample&firstseconly&link}}
Controlling header size in included pages
By default, the headers in included pages start one level lower than the last header in the current page. For example, if the section before the include is a level-three header, then a level-6 header in the included page will become a wimply little level-2.
If you want higher-level headers, you can trick the plugin by putting an empty header above the include. In the following example, a level-6 header in the included page will show up as level-5:
=== Some Section ===
Stuff
====== ======
{{page>somepage}}
- Zioth
Including a paragraph or excerpt from a page
See the Hidden Header plugin. -Zioth
2012-01-25 "Angua"
Just tested with the current version and it works for me. — renux 2012/02/10 12:44
Include from same page?
Using it on my knowledge wiki and it works well. However, I'd like to be able to include a section from the current page - for use with the ItemTable Plugin (along with something to hide the inline text of course. — Julian Knight 2012-03-23
Does it still work? Can't make it on my wiki page.
— Piotr 2017-10-04
Align Feature
It'll be great to be able to align included pages. Because a lot of people are using this feature for infobox purposes and some would love to be able to control the alignment of the
{{page>people:obama}}
using the core syntax by adding spaces before of after the syntax.
— James 2014-05-13 20:38
Exclude Feature
It would be nice, if there would be an “exclude” option. When we use the namespace feature, we don't want certain pages in the included in the resulting page: for example exclude “sidebar” or “start”.
— Manuel 2014-10-30 02:42
I would appreciate that feature too.
— Florian 2015-07-18 18:43
Same here, the possibility of the exclusion of listed namespaces would be much appreciated.
— Tommy 2016-2-19 21:18
I totally agree.
—- Chris 2016-2-21 09:12
blog plugin supports Exclude Feature
— HsinTang 2016-07-26
I created a PR for an exclude option! Testing or adding tests would be appreciated.
— sleeping 2020-04-11 07:57
The exclude flag has been merged!
— sleeping 2020-04-16 19:28
Empty Section
We are using the plugin a lot for technical documentation. If we include a named section (#title), and that section doesn't exist, the plugin includes the whole page. This really annoying. Would it be possible to change the behavior so that if a section doesn't exist it doesn't include anything (the same as when a page doesn't exist), please?
— Simon 2015-02-02 14:50
Just thought of asking about this issue. Is there any possibility to avoid that? — Samana Johann 2018-08-20 19:45
No Other data
I love this plugin but I have a question. How do I completely remove all other data included, such as user, mdate, etc.? If I do them as individual flags I still see the grey bar under the included content. There must be a flag that just excludes all the content, right? Am I just missing it somehow?
Thanks!
— Max 2017.03.21
Hi there, I think you are looking for
{{page>ID&nouser&nodate&nofooter}}
Namespace lists using &linkonly and &beforeeach/&aftereach
I've been trying to format a list of pages generated using namespace> with &linkonly - ideally as a simple unordered list. I'm adding this paragraph to help others searching for help because it took me several hours to find out that it is not possible and this is a known issue logged as a feature request.
— vt306 2017.03.29
Thanks to Michael Hamann for the advice. The pagequery plugin is the solution for this.
— vt306 2017.04.06
Option to pass revision of main page to includes pages
We are currently using DokuWiki for technical documentation. Within DokuWiki we use the 'date_at' function to go back to an old revision to see which version of the page a customer recieved. It would be very usefull if the included pages would honour the revision of the main page. To clarify: if the main page is shown at a specific revision, the included pages should also be shown at the last revision before the date of the main page. Would something like that be possible to incorporate?
Thanks in advance! Ruud
Translations
If it is of use, a paticular Translation of the Plugin's info page into German can be taken from here. — Samana Johann 2018-08-20 12:11
Display search results on a page?
Hi, I was wondering if it is possible to display the search result of a term or phrase on a page?
- OYMYO
Passing parameters/arguments
I think it would be cool if this plugin supported options/arguments like in MediaWiki.
Something like this:
- page1.txt
Test by {{{1}}}
- page2.txt
{{page>:page1|Me}}
And page2 would be parsed into:
Test by Me
— hasha2982 2020-08-19 17:12
Sorry, didn't know about the Templater Plugin — hasha2982 2020-08-19 17:25
2026-2-5 19:15:53
Imagelink Plugin
—- plugin —- description: Create nice navigation links with image and title author : peterfromearth email : coder@peterfromearth.de type : syntax lastupdate : 2020-02-29 compatible : depends : conflicts : similar : tags : link image navigation
downloadurl: https://github.com/peterfromearth/dokuwiki-plugin-imagelink/zipball/master bugtracker : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/issues sourcerepo : https://github.com/peterfromearth/dokuwiki-plugin-imagelink/ donationurl:
screenshot_img : https://raw.githubusercontent.com/peterfromearth/dokuwiki-plugin-imagelink/master/example/screenshot.png
Installation
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Examples/Usage
See the plugin in action here.
<imagelink?title=Impressionen>
[[:impressionen|{{ :intro:links:getreide.jpg?linkonly |}}]]
</imagelink>
Syntax
<imagelink?title="TITLE NAME">
[[...|{{...}}]]
</imagelink>
Use image with links see image_links
Configuration and Settings
Development
Change Log
- version 2020-02-29 (2020/03/01 01:59)
- Initial commit (2020/03/01 01:56)
Known Bugs and Issues
ToDo/Wish List
FAQ
Discussion
2026-2-5 19:15:08
Tag Plugin
—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing
downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag
Description
The Tag Plugin lets you assign category tags to wiki pages.
Components
Tag
Add a tag to the page
{{tag>[list of tags]}}
| [list of tags] | a space separated list of tags that describe the content of the current page | required |
|---|
Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.
Examples:
{{tag>tag1 tag2 tag3}}- with namespaces:
{{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}} - multiple word tags:
{{tag>tag1_with_multiple_words tag2 tag3_part}} {{tag>"tag with spaces" tag2}}– Within quotes you can use spaces. Tag is stored internally with underscores_.
Topic
List all pages with given tags.
{{topic>[tag]&[flags]}}
| [tag] | the category tag for which you want a list of pages | required |
|---|---|---|
| [flags] | pagelist flags delimited by &, see flags | optional |
This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:
- If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
+creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the+(AND), so each listed page must have this tag.-removes all pages tagged with the given tag from the list of already found pages (NOT).
Example:
{{topic>tag1 -tag2}}– Lists all pages tagged with tag1 but not with tag2.{{topic>tag1 +tag2}}– Lists all pages tagged with tag1 and tag2.{{topic>tag1 tag2}}– Lists all pages tagged with either tag1 or tag2 or both.{{topic>ns1?tag1 tag2}}– List all pages inside namespace ns1 tagged with either tag1 or tag2{{topic>.?tag1 tag2}}– List all pages inside the current namespace tagged with either tag1 or tag2{{topic>tag1 tag2 tag3&nodate&desc&sort}}(Adding pagelist options to change the design)
Searchtags
Search form for filtering by tag.
{{searchtags&[flags]}}
| [flags] | pagelist flags delimited by &, see flags | optional |
|---|
This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.
This is a great feature which you should not miss. Please add a screenshot of this cool feature.
And you might check out TagFilter Plugin for similar purpose but in different scenarios.
Example:
{{searchtags}}– The basic syntax{{searchtags&nodate&desc&sort}}– with pagelist options to change the design{{searchtags&nonsform}}– hide the namespace selector
Count
Shows a list of tags and its number of occurrences.
{{count>[tag][&namespace]}}
| [tags] | The tag for which you want to list the occurrence. Multiple tags separated by spaces. | optional |
|---|---|---|
| &[namespaces] | Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. | optional |
This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.
Example:
{{count>+}}– List all tags with related occurrences.{{count>tag1 tag2}}– List the occurrence of tag1 and tag2.{{count>tag1 tag2 tag3&. ns1 ns2}}– List all occurrences for the given tags inside the namespaces (the dot.specifies the root namespace){{count>+&ns1 ns2}}– List all tags inns1andns2.
Tagpage
Make link to the tag list
{{tagpage>[tag][&dynamic][|title]}}
This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.
Example:
{{tagpage>test_foo}}– The basic syntax{{tagpage>test_foo&dynamic}}– A link with dynamic link color{{tagpage>test_foo|my title}}– A link with custom title{{tagpage>test_foo&dynamic|my | title}}– A link with dynamic link color and custom title (that can also contain|)
Configuration
The plugin can be configured with the DokuWiki configuration manager available in the admin menu.
namespace | Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag |
|---|---|
sortkey | Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title |
sortorder | Sort order of the topic overview (ascending or descending) |
pagelist_flags | Comma separated Flags of the pagelist plugin which is used to display the topic overview |
toolbar_icon | Show icon in page editor toolbar to add tags. |
list_tags_of_subns | When counting tags in specified namespaces include also tags in subnamespaces. |
tags_list_css | Choose tags list style between standard or optimised for top of page position. |
Tagindex Rebuild
If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.
Demo / Screenshots
Changes
- 2014-02-16
- New and updated translations
- Fixed tag searching with out of date indexes and numbers
- Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
- 2013-04-14
- New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
- Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
- In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
- The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
- Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
- 2013-04-05:
- New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
- Removed the Technorati ping feature as Technorati is no longer using any pings
- zh-tw translation updated
- 2013-02-15:
fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
- 2012-11-25
- New searchtags feature, displays a search form for the topic syntax
- Fix section edit button styles for the new dokuwiki template
- In the topic syntax now really only namespaces and not pages are matched by namespace parameter
- When sorting by the title the case is ignored now
- Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
- 2012-08-24
- The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
- Tags are now normalized in the same way as page ids are normalized
Development changelog:
- Merge pull request #257 from dokuwiki-translate/lang_update_749_17017… (2023/12/06 04:53)
- translation update (2023/12/05 22:20)
- update plugin.info.txt (2023/10/18 04:40)
- Make selector less specific by using .dokuwiki (2023/10/18 04:39)
- Version upped (2023/09/12 05:50)
- Merge pull request #254 from Miro-Collas/master (2023/09/11 23:31)
- Another minor fix (2023/09/11 07:10)
- Miro bugfix (2023/09/11 07:04)
Sites using this Plugin
Feel free to add yours here:
- http://tokeek.de (German)
- Prinz Eisenherz Lexikon (German)
- Psiconauti (Italian)
- Blog Fred Radeff (French)
FAQ
How to use tags which consist of multiple words?
Just use an “_”, it gets automatically replaced by a “ ” i.e.:
{{tag>tag_with_multiple_words}}
Also, quotes seem to work:
{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work
Let's use one of the example websites.
If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess
This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use
RewriteCond %{REQUEST_URI} !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$ tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags
This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.
- action.php
function _handle_keywords(&$data) { global $ID; // Fetch tags for the page; stop proceeding when no tags specified $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER); if(is_null($tags)) return; // Replace underscores with blanks foreach($data->data['meta'] as &$meta) { if($meta['name'] == 'keywords') { $meta['content'] = str_replace('_', ' ', $meta['content']); // add extra styling $t = explode(',', $meta['content']); if(in_array('deprecated', $t)) { $data->data['style'][] = array('type' => 'text/css', '_data' => '.dokuwiki .page {background-color: red;}'); } } } }
Customizing the breadcrumbs
If you add at pagelist/helper.php
function tpl_youarehere2_help($id){ $result = ''; global $conf; global $ID; global $lang; // check if enabled if(!$conf['youarehere']) return false; $parts = explode(':', $id); $count = count($parts); // always print the startpage $result .= html_wikilink(':'.$conf['start']); // print intermediate namespace links $part = ''; for($i=0; $i<$count - 1; $i++){ $part .= $parts[$i].':'; $page = $part; if ($page == $conf['start']) continue; // Skip startpage // output $result .= ' » '.html_wikilink($page); } // print current page, skipping start page, skipping for namespace index resolve_pageid('',$page,$exists); if(isset($page) && $page==$part.$parts[$i]) return $result; $page = $part.$parts[$i]; if($page == $conf['start']) return $result; $result .= ' » '.html_wikilink($page); return $result; } function tpl_youarehere2($id) { $str = $this->tpl_youarehere2_help($id); $pos = strrpos($str , '»'); if ($pos == -1) return $str; return substr($str, 0, $pos); } function addPage2($page) { $id = $page['id']; if (!$id) return false; $this->page = $page; $this->_meta = NULL; // priority and draft if (!isset($this->page['draft'])) { $this->page['draft'] = ($this->_getMeta('type') == 'draft'); } $class = ''; if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' '; if ($this->page['draft']) $class .= 'draft '; if ($this->page['class']) $class .= $this->page['class']; if(!empty($class)) $class = ' class="' . $class . '"'; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->_pageCell($id); if ($this->column['date']) $this->_dateCell(); if ($this->column['user']) $this->_userCell(); if ($this->column['desc']) $this->_descCell(); foreach ($this->plugins as $plug => $col) { if ($this->column[$col]) $this->_pluginCell($plug, $col, $id); } $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF; $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">'; $this->doc .= $this->tpl_youarehere2($id); $this->doc .='</td>'.DOKU_LF; $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF; return true; }
And change tag/action.php
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage($page); }
to
$pagelist->setFlags($flags); $pagelist->startList(); foreach ($pages as $page) { $pagelist->addPage2($page); }
After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.
Bad appearance when displaying tags at top of page
Integrated to main code (see tags_list_css) option
When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:
div.dokuwiki div.tags { border-top: 2px dotted __border__; font-size: 95%; text-align: right; /* clear: both; */ }
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10
You need to add copy of the existing tag pattern, and modify it to
- syntax/tag.php
$this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag'); //e.g. Spanish: $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers
Is there a way to group pages by the first letter of their name or header?
Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list
No.
Collapsible outline of all tags?
My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21
—
I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx
Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.
For bugs or feature requests, there is the bug tracker linked here : Bug tracker.
This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.
If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?
Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
- Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
- Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
- In most of my installation it works, in some not… clueless!
- How to sort the taglist (count>+) alphabetical?
My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02
Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks
Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02
Blank pages
I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(
All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(
I am using Debian Wheezy and I am having the same issue.
»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V
Nothing was found.
Same here, get a Nothing was found page.
(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.
SEO meta keywords
Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00
Sorting the {{count>}} results
Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42
This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan
In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim
Unorderd List of all tags?
Is there a way to gen an unorderd list of all tags, similar as
| Tag | # |
|---|---|
| 临汾文脉 | 1 |
| 霍州文史 | 1 |
| 文史广告 | 1 |
| 隰县 | 1 |
| 乡宁 | 1 |
| 乡宁文史 | 1 |
| 襄汾文史 | 1 |
, but without table and occurrences?
Filtering the list of Tags?
Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.
Add "*" to list all the tags under a tag namespace?
I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use
{{topic> ns1:*}}
to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28
—
Columns?
2024-12-23
Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.
Count Table Columns
2025-05-01
I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.
It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.
Exclude subnamespaces
I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?
2026-2-5 16:38:34
====== Add New Page Plugin
Compatible with DokuWiki
2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection
Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere
Tagged with button, create, form
Needed for autoincludeindex
By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).
The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.
The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.
The form submit button is disabled if there is no text in the title field.
Edit
Usage
Put
anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.
Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.
with configuration option “Hide namespace selection” enabled.
with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:
Or, to specify a namespace:
Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).
Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,
will create a new namespace within the foo namespace.
Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification
When used together with the autopage option to hide the input field, a daily page can be created with a single button click:
Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.
General syntax:
?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:
overwrite the default hide setting
custom namespace exclusion and hide root
disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub
Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option
Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.
Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:
Use the newtpl template
Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one
The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.
Edit
Multiple occurences
The
syntax may be added multiple times on the same page.
Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:
<?php echo p_render('xhtml',p_get_instructions('
'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.
Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:
Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?
This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?
Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?
Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development
2026-2-5 15:54:19
all above flags does not work, the index pages in sub namespace is still included .
This is global configuration, you should configure it inConfiguration Manager. — Siyuan Liu 2023-08-17
Discussion
Please report bugs or feature requests at the Bug tracker.
Is it possible to make a blog in one namespace be in ascending order, and a blog in a different namespace to be in descending order?
2026-2-5 15:55:33
====== Add New Page Plugin
Compatible with DokuWiki
2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection
Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere
Tagged with button, create, form
Needed for autoincludeindex
By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).
The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.
The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.
The form submit button is disabled if there is no text in the title field.
Edit
Usage
Put
anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.
Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.
with configuration option “Hide namespace selection” enabled.
with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:
Or, to specify a namespace:
Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).
Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,
will create a new namespace within the foo namespace.
Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification
When used together with the autopage option to hide the input field, a daily page can be created with a single button click:
Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.
General syntax:
?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:
overwrite the default hide setting
custom namespace exclusion and hide root
disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub
Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option
Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.
Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:
Use the newtpl template
Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one
The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.
Edit
Multiple occurences
The
syntax may be added multiple times on the same page.
Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:
<?php echo p_render('xhtml',p_get_instructions('
'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.
Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:
Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?
This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?
Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?
Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development
2026-2-5 15:54:19
all above flags does not work, the index pages in sub namespace is still included .
This is global configuration, you should configure it inConfiguration Manager. — Siyuan Liu 2023-08-17
Discussion
Please report bugs or feature requests at the Bug tracker.
Is it possible to make a blog in one namespace be in ascending order, and a blog in a different namespace to be in descending order?
2026-2-5 15:55:33

