CWF Documentation

  • Overview
  • Sections
  • Views
  • Splitter
  • Binaries
  • Admin
  • Template Tags
  • Templates
Fork me on GitHub

Menu Rendering¶

class cwf.views.menu.Menu(request, section)[source]¶

Knows how to get the information required to render the navigation from a section.

Assumes a top nav with one selected item.

And a side nav that is everything under the selected top nav item

If you use a cwf.views.base.View then you will have one of these in request.state (via the get_state method)

This is best used with the CWF Menu Templates.

global_nav()[source]¶

Find the root ancestor of the current section and return a list of navs for just the top level sections.

side_nav()[source]¶

Find the top nav of the current section and return the list of navs representing the children for that top nav.

These children will recursively have children of their own that will go as far down as the section itself and any siblings of this sections’ parent.

Previous page

← Redirect Helper

Next page

→ Splitter

This Page

  • Show Source

Navigation

  • index
  • modules    
  • next    
  • previous    
  • CWF Documentation 0.1 documentation »
  • Views »
© Copyright 2012, Stephen Moore. Created using Sphinx 2.0.0.