$def with (page) $if page.type.key in ["/type/work", "/type/edition"]: $ edit_url = page.url(suffix="/edit") $else: $ edit_url = page.key + "?m=edit"