$def with (page)
$var title: $page.name
$ can_add_tag = ctx.user and (ctx.user.is_super_librarian())
$ has_tag = 'tag' in page
$ q = query_param('q')
$if can_add_tag:
$ edit_tag_url = page.tag.get('id') + '/-/edit' if 'tag' in page else '/tag/add'
$if not has_tag:
$ edit_tag_url += '?name=%s&type=subject&sub_type=%s' % (page.name, page.subject_type)
$_("Edit")
$page.name
$ungettext("%(count)d work", "%(count)d works", page.work_count, count=page.work_count)
$if has_tag:
$page.tag['description']
$_("Search for books with subject %(name)s.", name=page.name)
$:render_template("books/custom_carousel", books=page.works, load_more={"url": page.key + ".json", "limit": len(page.works)})
$:macros.PublishingHistory(page.publishing_history)
$:macros.RelatedSubjects(page)
$:macros.ProlificAuthors(page.authors)