diff options
Diffstat (limited to 'docs/content/en/templates/views.md')
-rw-r--r-- | docs/content/en/templates/views.md | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/docs/content/en/templates/views.md b/docs/content/en/templates/views.md index e49f1debb..4170196b6 100644 --- a/docs/content/en/templates/views.md +++ b/docs/content/en/templates/views.md @@ -34,7 +34,7 @@ To create a new view, create a template in each of your different content type d summary.html ``` -Hugo also has support for a default content template to be used in the event that a specific content view template has not been provided for that type. Content views can also be defined in the `_default` directory and will work the same as list and single templates who eventually trickle down to the `_default` directory as a matter of the lookup order. +Hugo also has support for a default content view template to be used in the event that a specific content view template has not been provided for that type. Content views can also be defined in the `_default` directory and will work the same as list and single templates who eventually trickle down to the `_default` directory as a matter of the lookup order. ```txt ▾ layouts/ @@ -46,7 +46,7 @@ Hugo also has support for a default content template to be used in the event tha ## Which template will be rendered? -The following is the [lookup order][lookup] for content views: +The following is the [lookup order] for content views: 1. `/layouts/<TYPE>/<VIEW>.html` 2. `/layouts/_default/<VIEW>.html` @@ -74,7 +74,7 @@ In this example, `.Render` is passed into the template to call the [render funct ### `summary.html` -Hugo will pass the entire page object to the following `summary.html` view template. (See [Page Variables][pagevars] for a complete list.) +Hugo passes the page object to the following `summary.html` view template. {{< code file=layouts/_default/summary.html >}} <article class="post"> @@ -101,13 +101,7 @@ Continuing on the previous example, we can change our render function to use a s {{< /code >}} [lists]: /templates/lists/ -[lookup]: /templates/lookup-order/ -[pagevars]: /variables/page/ [render]: /methods/page/render/ [single]: /templates/single-page-templates/ -[spf]: https://spf13.com -[spfsourceli]: https://github.com/spf13/spf13.com/blob/master/layouts/_default/li.html -[spfsourcesection]: https://github.com/spf13/spf13.com/blob/master/layouts/_default/section.html -[spfsourcesummary]: https://github.com/spf13/spf13.com/blob/master/layouts/_default/summary.html [summaries]: /content-management/summaries/ [taxonomylists]: /templates/taxonomy-templates/ |