I am currently repeating the code for my navigation menu on each individual tab, but I want to use partial files so that there is no duplicate code.
This is what I use (below), with the class active in another list item depending on the file. Instead, I would like to use partial {{> fruits-nav}} , but I cannot find any information on how to set the class active depending on which file the partial includes.
<div id="table-nav-tabs"> <ul class="nav nav-tabs"> <li class="apple"><a href="{{id}}">apple</a></li> <li class="active orange"><a href="{{id}}">orange</a></li> <li class="mango"><a href="{{id}}">mango</a></li> <li class="pineapple"><a href="{{id}}">pineapple</a></li> </ul> </div>
theintellects
source share