Skip to content

Commit

Permalink
Add some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Batiste Bieler committed Jan 3, 2019
1 parent 0fdae78 commit fe2ea54
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/navigation-template-tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ Django-pages-cms offers various template tags which can be used to create a site
.. contents::
:local:

pages_navigation variable
===========================

By default the variable `pages_navigation` will be available within
all of the CMS pages. `pages_navigation` is a list of Pages obtained
by calling the `get_navigation` method on the `Details` class based view
of the CMS::

def get_navigation(self, request, path, lang):
"""Get the pages that are at the root level."""
return Page.objects.navigation().order_by("tree_id")

You can subclass the `Details` class based view to change
this behaviour.

pages_menu
==========

Expand Down

0 comments on commit fe2ea54

Please sign in to comment.