Created
November 20, 2013 19:51
-
-
Save teammixture/7569872 to your computer and use it in GitHub Desktop.
Example adding a class dynamically to a body tag based on the url in http://mixture.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>{% block title %}Example{% endblock %}</title> | |
</head> | |
<body class="{{ mixture.url | slugify }}"> | |
{% block content %}{% endblock %} | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will slugify the url and add to the body class, example...
/about - will become: about
/about-me - will become: about-me
/about-us/team - will become: about-usteam