Skip to content

Commit

Permalink
Improve compatibility with Read the Dokus template
Browse files Browse the repository at this point in the history
Add data-wiki-id attribute that is used by DokuWiki "Read the Dokus" template to navigate between pages.
  • Loading branch information
eduardomozart authored Jan 30, 2024
1 parent f498ace commit 639ed93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/indexmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,11 @@ dTree.prototype.node = function (node, nodeId) {
(node.hns) ? str += node.hns : str += node.dokuid;
str += '"' + ' title="' + node.name + '"' + jsfnc;
str += ' onclick="javascript: ' + this.treeName + '.s(' + nodeId + ');"';
str += ' data-wiki-id="' + node.dokuid + '"';
str += '>' + node.name + '</a>';
}
else if (node.pid !== this.root.id) {
str += '<a id="s' + this.treeName + nodeId + '" href="javascript: ' + this.treeName + '.o(' + nodeId + '); " class="node"' + jsfnc + '>' + node.name + '</a>';
str += '<a id="s' + this.treeName + nodeId + '" href="javascript: ' + this.treeName + '.o(' + nodeId + '); " data-wiki-id="' + node.dokuid + '" class="node"' + jsfnc + '>' + node.name + '</a>';
} else {
str += node.name;
}
Expand Down

0 comments on commit 639ed93

Please sign in to comment.