Template:Team:Groningen/Header/AncestorLinks.js

From 2009.igem.org

Revision as of 14:35, 18 May 2009 by Jaspervdg (Talk | contribs)

var pnc = wgPageName.split('/'); var tc = wgTitle.split('/'); for(var i=0; i<pnc.length; i++) {

 var c = tc[i];
 var p = pnc.slice(0,i+1).join('/');
 if (i>0) document.write(' > ');
 if (i+1<pnc.length) {
   document.write(c.link(wgArticlePath.replace('$1',p)));
 } else {
   document.write(c);
 }

}