mirror of
https://github.com/gohugoio/hugo.git
synced 2024-07-05 08:42:12 +00:00
parent
321bac2fc2
commit
7125103b1e
|
@ -453,6 +453,22 @@ Takes a string and sanitizes it for usage in URLs, converts spaces to "-".
|
||||||
e.g. `<a href="/tags/{{ . | urlize }}">{{ . }}</a>`
|
e.g. `<a href="/tags/{{ . | urlize }}">{{ . }}</a>`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 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
|
## Advanced
|
||||||
|
|
||||||
### apply
|
### apply
|
||||||
|
|
Loading…
Reference in a new issue