Skip to content

Instantly share code, notes, and snippets.

@teammixture
Created November 20, 2013 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save teammixture/7569803 to your computer and use it in GitHub Desktop.
Save teammixture/7569803 to your computer and use it in GitHub Desktop.
Simple example - dynamically adding a class to navigation based on the url in http://mixture.io
<ul>
<li><a href="/" {% if mixture.url == "index" %}class="selected"{% endif %}>Home</a></li>
<li><a href="/about" {% if mixture.url == "about" %}class="selected"{% endif %}>About</a></li>
<li><a href="/contact" {% if mixture.url == "contact" %}class="selected"{% endif %}>Contact</a></li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment