From c69fa32d7dc8c5f6e3be77745fe07baa6536d738 Mon Sep 17 00:00:00 2001 From: Jeff Ramnani Date: Fri, 22 May 2015 11:43:29 -0500 Subject: [PATCH] Add ".Render" to the list of functions. Fixes: #1153 --- docs/content/templates/functions.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/content/templates/functions.md b/docs/content/templates/functions.md index b400f17b021..2fdfa641ada 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