`{{ record }}` isn't available in a normal template, but you can do that in [block templates](https://www.getlektor.com/docs/content/flow/#block-templating). This is not sufficiently well documented here: https://www.getlektor.com/docs/api/db/record/