https://github.com/tivix/django-flatpages-nav
Manage your flatpages much more easily using this app.
https://github.com/tivix/django-flatpages-nav
Last synced: 6 months ago
JSON representation
Manage your flatpages much more easily using this app.
- Host: GitHub
- URL: https://github.com/tivix/django-flatpages-nav
- Owner: Tivix
- License: mit
- Created: 2011-03-21T07:33:30.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-03-21T08:00:41.000Z (over 14 years ago)
- Last Synced: 2025-04-12T04:13:17.976Z (6 months ago)
- Language: Python
- Homepage: http://tivix.com/
- Size: 82 KB
- Stars: 9
- Watchers: 23
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
====================
django-flatpages-nav
====================Overview
--------This app helps any Django project easily control the order and visibility of flat page links in their main (usually header) and footer navs. The process from an end-users perspective is simple, add flatpages and then using Django admin control their visibility and order in the main/footer nav.
No need to ever hard-code these links in your base templates!
Installation
------------- Install flatpages_nav (ideally in your virtualenv!) using pip or simply getting a copy of the code and putting it in a directory in your codebase.
- Add ``flatpages_nav`` to your Django settings ``INSTALLED_APPS``::
INSTALLED_APPS = [
# ...
"flatpages_nav",
]- Add ``nav_flatpages`` to your Django settings ``TEMPLATE_CONTEXT_PROCESSORS``::
TEMPLATE_CONTEXT_PROCESSORS = [
# ...
"flatpages_nav.context_processors.nav_flatpages",
]- Run a db migration (using south) to make sure db table(s) for this app get created::
python manage.py migrate flatpages_nav- In your base template (usually base.html) use the new context variables that this app has added::
- {{ flatpage.title }}
{% for flatpage in main_nav_flatpages %}
{% endfor %}
and in the footer
- {{ flatpage.title }}
{% for flatpage in footer_nav_flatpages %}
{% endfor %}
This open-source app is brought to you by Tivix, Inc. ( http://tivix.com/ )