Menu with active class (hash) Last updated: 13. Apr 2023

Bootstrap static menu

<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
      <div class="container">
        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>
        <a class="brand" href="#"><img src="img/logo.png" alt="Logo" description="Company name" /></a>
        <div class="nav-collapse collapse">
          <ul class="nav pull-right">
            #var fpath = request.filepath.toLowerCase()#
            <li class="#if(fpath == '/') {#active#}#"><a href="/">Home</a></li>
            <li class="#if(fpath == '/about') {#active#}#"><a href="/about">About</a></li>
            <li class="#if(fpath == '/services') {#active#}#"><a href="/services">Services</a></li>
            <li class="#if(fpath == '/projects') {#active#}#"><a href="/projects">Projects</a></li>
            <li class="#if(fpath == '/kontakt-oss') {#active#}#"><a href="/contact">Contact</a></li>
          </ul>
        </div>
      </div>
    </div>
  </div>

Dynamic menu

Example of a menu with some dynamic content.