From: Jeff Ramnani Date: Fri, 22 May 2015 16:43:29 +0000 (-0500) Subject: Add ".Render" to the list of functions. X-Git-Tag: v0.14~22 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7125103b1e7fedfe29516cee9ea70ef22d65aca7;p=brevno-suite%2Fhugo Add ".Render" to the list of functions. Fixes: #1153 --- diff --git a/docs/content/templates/functions.md b/docs/content/templates/functions.md index b400f17b..2fdfa641 100644 --- a/docs/content/templates/functions.md +++ b/docs/content/templates/functions.md @@ -453,6 +453,22 @@ Takes a string and sanitizes it for usage in URLs, converts spaces to "-". e.g. `{{ . }}` + +## Content Views + +### Render +Takes a view to render the content with. The view is an alternate 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 on a piece of content, and in 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 }} + + + ## Advanced ### apply