Template:Team:Groningen/Header/AncestorLinks.js
From 2009.igem.org
(Difference between revisions)
(Trying to put a script in a separate page.) |
m (Remove ampersand test.) |
||
Line 5: | Line 5: | ||
var p = pnc.slice(0,i+1).join('/'); | var p = pnc.slice(0,i+1).join('/'); | ||
if (i>0) document.write(' > '); | if (i>0) document.write(' > '); | ||
- | if (i+1<pnc.length | + | if (i+1<pnc.length) { |
document.write(c.link(wgArticlePath.replace('$1',p))); | document.write(c.link(wgArticlePath.replace('$1',p))); | ||
} else { | } else { |
Revision as of 14:10, 18 May 2009
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); }
}