hugo/docs/content/en/functions/Render.md
2023-10-20 09:43:56 +02:00

769 B

title description categories keywords menu function relatedFunctions
.Render Takes a view to apply when rendering content.
functions
docs
parent
functions
aliases returnType signatures
template.HTML
.Render LAYOUT

The view is an alternative layout and should be a file name that points to a template in one of the locations specified in the documentation for Content Views.

This function is only available when applied to a single piece of content within a list context.

This example could render a piece of content using the content view located at /layouts/_default/summary.html:

{{ range .Pages }}
  {{ .Render "summary" }}
{{ end }}