Place this in baseof.html:
.Data = {{ printf "%v" .Data }}<br>
.Data.Pages = {{ printf "%v" .Data.Pages }}<br>
.Pages = {{ printf "%v" .Pages }}<br>
Then visit:
- A single page
- A list page (home for example)
- A taxonomy page
- A term page
1) On single pages:
.Data
is an empty map..Data.Pages
is an empty page collection.Pages
is an alias to.Data.Pages
In some older themes, before the
.Pages
alias was available, sometimes you will still see:{{ range .Data.Pages }}
2) On the home page or section pages:
.Data
is a map containing apages
element.Data.Pages
is the page collection available to the current page.Pages
is an alias to.Data.Pages
3) On taxonomy pages:
.Data
is a map containing the following elements:Plural
,Singular
,Terms
,pages
, etc. See documentation.Data.Pages
is the page collection available to the current page.Pages
is an alias to.Data.Pages
4) On term pages:
.Data
is a map containing the following elements:Plural
,Singular
,Term
,pages
, etc. See documentation.Data.Pages
is the page collection available to the current page.Pages
is an alias to.Data.Pages