Skip to content

Commit

Permalink
Add data-wiki-id attr to Fancytree (Treenew)
Browse files Browse the repository at this point in the history
DokuWiki adds this attribute to "a" interwikis automatically, it points to the namespace/pageID, e.g. "doku.php?id=3cx:add_phones" the value of data-wiki-id attr is "3cx:add_phones".
On Read the Dokus template, this attribute is used on sidebar to determine the "Next" and "Previous" buttons location.
  • Loading branch information
eduardomozart authored Feb 1, 2024
1 parent 3a7b842 commit cf28633
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ jQuery(function(){ // on page load
if(node.data.hnsNotExisting) {
cls = ' class="wikilink2"';
}
data.$title.html("<a href='" + node.data.url + "'"+cls+">" + node.title + "</a>");
data.$title.html("<a href='" + node.data.url + "'"+cls+" data-wiki-id='" + node.key + "'>" + node.title + "</a>");
}
},
//retrieve initial data
Expand Down

0 comments on commit cf28633

Please sign in to comment.