{ "info": { "author": "Chris Beaven", "author_email": "smileychris@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "``{% nav %}`` tag\n=================\n\nA simple Django template tag to handle navigation item selection.\n\n.. image:: https://secure.travis-ci.org/SmileyChris/django-navtag.png?branch=master\n :target: http://travis-ci.org/SmileyChris/django-navtag\n\nExample\n-------\n\nAdd the app to your ``INSTALLED_APPS`` setting::\n\n INSTALLED_APPS = (\n # ...\n 'django_navtag',\n )\n\nGive your base template a navigation block something like this::\n\n {% load navtag %}\n\n {% block nav %}\n {% nav text ' class=\"selected\"' %}\n
\n {% endblock %}\n\nIn your templates, extend the base and set the navigation location::\n\n {% extends \"base.html\" %}\n\n {% block nav %}\n {% nav \"home\" %}\n {{ block.super }}\n {% endblock %}\n\n.. note::\n This works for multiple levels of template inheritance, due to the fact\n that only the first ``{% nav %}`` call found will change the ``nav``\n context variable.\n\n\nHierarchical navigation\n-----------------------\n\nTo create a sub-menu you can check against, simply dot-separate the item::\n\n {% nav \"about_menu.info\" %}\n\nThis will be pass for both ``{% if nav.about_menu %}`` and\n``{% if nav.about_menu.info %}``.\n\n\nUsing a different context variable\n----------------------------------\n\nBy default, this tag creates a ``nav`` context variable. To use an alternate\ncontext variable name, call ``{% nav [item] for [var_name] %}``::\n\n {% block nav %}\n {% nav \"home\" for sidenav %}\n {{ block.super }}\n {% endblock %}\n\n\nSetting the text output by the nav variable\n-------------------------------------------\n\nAs shown in the initial example, you can set the text return value of the\n``nav`` context variable. Use the format ``{% nav text [content] %}``. For\nexample::\n\n {% nav text \"active\" %}\n