An easy way to copy each section link. Copy these files into your conf directory. (Or if they already exist, copy the code into them.)
(As requested on http://forum.dokuwiki.org/thread/5709.)
/** Show each section link when hovering over each respective headline. * * @author Anika Henke <anika@selfthinker.org> * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) */ function addWikiLinksToHeadlines() { // iterate through all headlines for (var i=1; i<6; i++) { for (var j=0; j<document.getElementsByTagName("h"+i).length; j++) { // ".firstChild" should be removed for the next DokuWiki version var elem = document.getElementsByTagName("h"+i)[j].firstChild; if (elem!=null && elem.firstChild!=null) { // build wiki link var ID = elem.id; var text = elem.firstChild.data; var wikiLink = '[[:'+JSINFO.id+'#'+ID+'|'+text+']]'; // add wiki link to headline var container = document.createElement('span'); container.setAttribute("class", "wikiLink"); container.innerHTML = wikiLink; elem.appendChild(container); } } } } addInitEvent(addWikiLinksToHeadlines);
.dokuwiki .page h1, .dokuwiki .page h2, .dokuwiki .page h3, .dokuwiki .page h4, .dokuwiki .page h5 { position: relative; } .dokuwiki a span.wikiLink { display: none; color: #999; background-color: #fff; font: normal 11px Arial, sans-serif; padding: 0 5px; position: absolute; top: -1em; left: 0; } .dokuwiki .page h1:hover span.wikiLink, .dokuwiki .page h2:hover span.wikiLink, .dokuwiki .page h3:hover span.wikiLink, .dokuwiki .page h4:hover span.wikiLink, .dokuwiki .page h5:hover span.wikiLink { display: block; }