1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Squashed 'docs/' content from commit f887bd7b

git-subtree-dir: docs
git-subtree-split: f887bd7b4e3e7c7e76cd63951e5b0d37d8fe0ac7
This commit is contained in:
Bjørn Erik Pedersen
2017-08-10 17:18:22 +02:00
commit ec4e6f9df2
839 changed files with 44703 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
---
title: render
# linktitle: Render
description: Takes a view to apply when rendering content.
godocref:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [functions]
menu:
docs:
parent: "functions"
#tags: [views]
signature: ["render LAYOUT"]
workson: []
hugoversion:
relatedfuncs: []
deprecated: false
aliases: []
---
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](/templates/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 .Data.Pages }}
{{ .Render "summary"}}
{{ end }}
```
[list context]: /templates/lists/