$def with (path, create=None) $var title: $_("%(path)s is not found", path=path) $if create is None: $ prefixes = ["/authors/", "/books/", "/works/", "/show-marc", "/account/"] $ create = not any(path.startswith(prefix) for prefix in prefixes)

$_("404 - Page Not Found")

$_("%(path)s does not exist.", path=path)

$# Show create link only to admins $if ctx.user and ctx.user.is_admin() and create:

$_("Create it?")

$if "/templates" in path or "/macros" in path:

$_("Looking for a template/macro?")

$:macros.PageList(path)