Rewrite html menu links for single/multi-page html views.

Peter D. Barnes, Jr. 2012-07-31 15:54:49 -07:00
parent ede3209d2c
commit c3b7620aba
2 changed files with 9 additions and 1 deletions

View File

@ -25,6 +25,7 @@
<script type="text/javascript" src="_static/drop-down-menu.js"></script>
<script type="text/javascript" src="_static/ns3_version.js"></script>
<script type="text/javascript">var ns3_builder="{{builder}}";</script>
<script type="text/javascript" src="_static/ns3_links.js"></script>
{% endblock %}

View File

@ -24,7 +24,14 @@ var ns3_index = "index.html";
var ns3_rel = ns3_host + ns3_release;
var ns3_api = ns3_rel + ns3_doxy + ns3_index;
ns3_index = ns3_local + "html/" + ns3_index;
// The Sphinx layout template defines
// var ns3_builder = "html", or "singlehtml"
// so we can condition the links on single/multi-page view.
if ( (typeof ns3_builder != 'undefined') && (ns3_builder == "singlehtml") ) {
ns3_index = ns3_local + "singlehtml/" + ns3_index;
} else {
ns3_index = ns3_local + "html/" + ns3_index;
}
var ns3_man = ns3_rel + "manual/" + ns3_index;
var ns3_mod = ns3_rel + "models/" + ns3_index;