Template:PreviousNext

  • Revision slug: Template:PreviousNext
  • Revision title: Template:PreviousNext
  • Revision id: 296285
  • Created:
  • Creator: groovecoder
  • Is current revision? No
  • Comment

Revision Content

<% /* first parameter: path of Previous page */ /* second parameter: path of Next page */ var lang = env.locale; var s_PreviousNext = mdn.localString({ "en-US": ["« Previous","Next »"], "cs": ["« Předchozí","Následující »"], "de": ["« zurück","weiter »"], "es": ["« Anterior","Siguiente »"], "fr": ["« Précédent","Suivant »"], "ja": ["« 前","次 »"], "ko": ["« 이전","다음 »"], "pl": ["« Poprzedni","Następny »"], "pt-PT": ["« Anterior","Próxima »"], "ru": ["« Предыдущая статья","Следующая статья »"], "zh-CN": ["« 上一页","下一页 »"], "zh-TW": ["« 前頁","次頁 »"] }); var strPrevious = ""; var strNext = ""; if ($0) { strPrevious = "" + s_PreviousNext[0] + ""; } if ($1) { strNext = "" + s_PreviousNext[1] + ""; } %>

<%- strPrevious %><%- strNext %>

Revision Source

<%
/* first parameter: path of Previous page */
/* second parameter: path of Next page */
var lang = env.locale;
var s_PreviousNext = mdn.localString({
  "en-US": ["« Previous","Next »"],
  "cs": ["« Předchozí","Následující »"],
  "de": ["« zurück","weiter »"],
  "es": ["« Anterior","Siguiente »"],
  "fr": ["« Précédent","Suivant »"],
  "ja": ["« 前","次 »"],
  "ko": ["« 이전","다음 »"],
  "pl": ["« Poprzedni","Następny »"],
  "pt-PT": ["« Anterior","Próxima »"],
  "ru": ["« Предыдущая статья","Следующая статья »"],
  "zh-CN": ["« 上一页","下一页 »"],
  "zh-TW": ["« 前頁","次頁 »"]
});
var strPrevious = "";
var strNext = "";
if ($0) {
  strPrevious = "<a style='float: left;' href='/" + lang + "/docs/" + $0 + "'>" + s_PreviousNext[0] + "</a>";
}
if ($1) {
  strNext = "<a href='/" + lang + "/docs/" + $1 + "'>" + s_PreviousNext[1] + "</a>";
}
%>
<div class="prevnext">
<p align="right"><%- strPrevious %><%- strNext %></p>
</div>
Revert to this revision