Q:

How add class='current-menu-item' to html menu with php in smarty .tpl file

I have header.tpl file to be included in my whole website running Smarty. I need a php-if code that make certain navigation menu element to take class 'current-menu-item' when the page is active in the browser.
<ul>
<li class="current-menu-item"><a href="http://localhost/dbk/index.php">Home</a> </li>
<li><a href="#">Company</a>
  <ul class="sub-menu">
    <li><a href="http://localhost/dbk/about.php">About Company</a></li>
    <li><a href="http://localhost/dbk/team.php">Excuslive Team</a></li>
    <li><a href="http://localhost/dbk/global-business.php">Global Business</a></li>
    <li><a href="http://localhost/dbk/contract-manufacturing.php">Contract Manufacturing</a></li>
  </ul>
</li>
<li><a href="#">Our Products</a>
  <ul class="sub-menu">
    <li><a href="http://localhost/dbk/pharmaceutical-products.php">Pharmaceutical Products</a></li>
    <li><a href="http://localhost/dbk/products/herbal-and-food.php">Herbal & Food Supplements</a></li>
    <li><a href="http://localhost/dbk/products/cosmetics.php">Cosmetics</a></li>
    <li><a href="http://localhost/dbk/products/veterinary-products.php">Veterinary Products</a></li>
  </ul>
</li>
<li><a href="http://localhost/dbk/blog">News Room</a></li>
<li><a href="http://localhost/dbk/careers.php">Careers</a> </li>
<li><a href="http://localhost/dbk/contacts.php">Contacts</a></li>

A:

Just through a local assigned tpl variable, i.e :
<li {if $page == "about"}class="current-menu-item"{/if}><a href="http://localhost/dbk/about.php">About Company</a></li> 
<li {if $page == "team"}class="current-menu-item"{/if}><a href="http://localhost/dbk/team.php">Excuslive Team</a></li>

