Crumb Tuple

An informal data type, that is a 5-tuple, and is the basic navigation
data unit. The method Directory.get_crumbs() returns a list of
such 5-tuples. The 5 items in a crumb 5-tuple are:

    (url_path_from_root, component, crumb_label, title, directory)

The Navigation section contains
numerous examples of the crumb 5-tuple.

In a normally traversed URL, the last crumb, in the list of
crumb objects returned by the Gizmo(QP) Directory.get_crumbs()
method, is the one for the current page.
However Directory instances, and their methods, are by default
not exposed to the template evaluation namespace.

This demo page shows two things:

  • How to easily expose, explicitly for this page only,
    the Gizmo(QP) Directory.get_crumbs()
    method to the template evaluation namespace — here passed as
    the get_crumbs keyword argument on page()
    (see the Python source for the Specials directory).
  • A rendering, below, of the crumb for this page,
    i.e. of the last traversed crumb
    (see Template source below).
(‘/specials/crumb’, ‘crumb’, ‘Crumb’, ‘Crumb Tuple’, <qp.sites.gzdemo.pages.specials.SpecialsDir object at 0x853d7cc>)