Table Of Contents

Previous topic

Uniforms

Next topic

Internals

This Page

Navigation Utilities

There are two lazy generators useful for creating internal links, menus and breadcrumb elements.

Navigator

The Navigator can be used to generate navigation menus.

class djpcms.utils.navigation.Navigator(*args, **kwargs)

A navigator for the web site

Breadcrumbs

This is my favorite navigation utility. Given a url it build a list of previous url elements. Each element is a dictionary contaning name and url. The last element in the list, the the current url, won’t contain the url value in the dictionary so that an internal link to the same page is not created in the HTML document.

The name value is calculated in the view method topics-views-title.

Breadcrumbs are available in the context dictionary with key breadcrumbs.

See topics-views-context-dictionary