* Graham * bemethavinci To be honest forget it stop worrying about xtgem-template or dummy classes it is easier if I just give you the code to add the 'active' navigation class direct.
Add this code to the end of your _footer
<script>
window.onload_events = function (){
  if ( document.getElementsByClassName ){
    window.mark_active_navigation = function (){
      var items = document.getElementsByClassName('nav');
      if ( items != undefined && items != null && items [0] != undefined ){
        for (h=0;h<items.length;h++){
          item = items[h].childNodes;
          var loc = decodeURI ( document.location.pathname ).replace ( ' ', '+' ).replace ( /\/__xt.+/, '' );
          for (var i = 0; i < item.length; i++){
            if ( item [ i ].firstChild && item [ i ].firstChild.getAttribute && item [ i ].firstChild.getAttribute('href') == loc ){
              item[i].className += ' active'; break; 
            }
          }
        }
      }
    }
    window.mark_active_navigation ();
  }
}
window.onload_events ();
</script>

Copy code

The script will add class="active" to the element containing the current pages link in the containing element with the class 'nav'
in the html below code the class will be added to the appropriate <li> element
it will give a 'active' appearance to that link
A basic nav-tabs bootstrap page header using this script looks like this
<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#"><img class="pull-left" src="--logo goes here--" alt="logo" /></a>
    </div>
    <ul class="nav" style="display:inline-block">
      <li><a href="/">Home</a></li>
      <li><a href="/blog">Blog</a></li>
      <li><a href="/forum">Forum</a></li>
    </ul>
  </div>
</nav>

Copy code

see the header on http://baretest.xtgem.com
2017-02-25 09:59 (edited 2017-02-25 15:39 by Graham ) · (0)

Online: Guests: 1