It's better when it's simple

User Tools

Site Tools


talkpage Plugin

Compatible with DokuWiki

Adora Belle

plugin Generate a link to a talk page for each page in the wiki

Last updated on

Similar to discussion

Tagged with discussion, mediawiki

This plugin generates a link to a Talk Page (like used in Wikipedia or the Vector Template). It is intended to be used in a sidebar of templates not having native talk page support.


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.

Change Log


Simply add the macro ~~TALKPAGE~~ anywhere in your sidebar page.

Configuration and Settings

The namespace where talk pages are stored can be set in the config manager. It defaults to talk.


I would be super handy if this plugin could generate the discussion link in the floating page tools with the TEMPLATE_PAGETOOLS_DISPLAY event. I know it should be fairly easy but I don't know how to do it unfortunately. — LayneeLaynee

2015-07-27 02:42

Several Meta Pages

I added some lines to have multiple meta-pages related to one article page. Here it is an additional data page which could provide rawdata to use for example with the include plugin. Maybe some more people are interested?

 * DokuWiki Plugin talkpage (Syntax Component)
 * @license GPL 2
 * @author  Andreas Gohr <>
// must be run within Dokuwiki
if (!defined('DOKU_INC')) die();
if (!defined('DOKU_LF')) define('DOKU_LF', "\n");
if (!defined('DOKU_TAB')) define('DOKU_TAB', "\t");
if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once DOKU_PLUGIN.'syntax.php';
class syntax_plugin_talkpage extends DokuWiki_Syntax_Plugin {
    public function getType() {
        return 'substition';
    public function getPType() {
        return 'normal';
    public function getSort() {
        return 444;
    public function connectTo($mode) {
    public function handle($match, $state, $pos, &$handler){
        $data = array();
        return $data;
    public function render($mode, &$renderer, $data) {
        global $INFO;
        if($mode != 'xhtml') return false;
        $renderer->info['cache'] = false;
        $talkns = cleanID($this->getConf('talkns'));
		$datans = cleanID($this->getConf('datans'));
        if(substr($INFO['id'],0,strlen($talkns)+1) === "$talkns:"){
            // we're on the talk page
            $goto1 = substr($INFO['id'],strlen($talkns)+1);
			$goto2 = $datans .':'.substr($INFO['id'],strlen($talkns)+1);
            $text1 = 'back';
			$text2 = 'data';
		}elseif(substr($INFO['id'],0,strlen($talkns)+1) === "$datans:"){
            // we're on the data page
			$goto1 = substr($INFO['id'],strlen($datans)+1);
			$goto2 = $talkns .':'.substr($INFO['id'],strlen($datans)+1);
            $text1 = 'back';
			$text2 = 'talk';
			// we are on article page
            // we want to the talk or data page
            $goto1 = $talkns .':'.$INFO['id'];
			$goto2 = $datans .':'.$INFO['id'];
			$text1 = 'talk';
			$text2 = 'data';
            //    $text = 'talk';
            //    $text = 'add';
        $renderer->doc .= '<a href="'.wl($goto1).'" class="talkpage talkpage-'.$text1.'">'.$this->getLang($text1).'</a><br> <a href="'.wl($goto2).'" class="talkpage talkpage-'.$text2.'">'.$this->getLang($text2).'</a>';
        return true;
// vim:ts=4:sw=4:et:

Boris 2016/01/17 20:19

plugin/talkpage.txt · Last modified: 2016-02-03 18:22 by andi