$def with (page) $ v = query_param("v", None) $if ctx.user and (ctx.user.is_admin() or ctx.user.is_usergroup_member('/usergroup/super-librarians')): $if v and not page.key.startswith("/books/ia:"):
$putctx("robots", "noindex,nofollow") $else: $ ctx.setdefault("links", []) $ ctx.links.append('') $if page.type.key in ["/type/edition", "/type/work", "/type/author"]: $ ctx.links.append('') $ ctx.links.append('') $if "superfast" in ctx.features: $page.prefetch() $ view = thingview(page) $var title: $:view.title $if 'content_type' in view: $var content_type = view.content_type $if 'rawtext' in view: $var rawtext = view.rawtext $:view