A context middleware is a special PyLucid API. It's similar to normal WSGI middlewares.
All PyLucid context middleware plugins would be initialized at the beginning and the result would be inserted at the end of the render process. This is necessary for all plug-ins if the content can be changed by other plugins, e.g.: A plugin should be able to add a link into the breadcrumb navigation line.
context middleware plugin are inserted via a special tag:
Note: ContextMiddlewares works only in the global page template! You can't insert it into a PageContent then you will get the error: "context middleware 'FooBar' doesn't exist!"
See also: