docs/content/en/functions/reflect/IsPage.md
raw| 1 | --- |
| 2 | title: reflect.IsPage |
| 3 | description: Reports whether the given value is a Page object. |
| 4 | categories: [] |
| 5 | keywords: [] |
| 6 | params: |
| 7 | functions_and_methods: |
| 8 | aliases: [] |
| 9 | returnType: bool |
| 10 | signatures: [reflect.IsPage INPUT] |
| 11 | --- |
| 12 | |
| 13 | {{< new-in 0.154.0 />}} |
| 14 | |
| 15 | ```go-html-template {file="layouts/page.html"} |
| 16 | {{ with site.GetPage "/examples" }} |
| 17 | {{ reflect.IsPage . }} → true |
| 18 | {{ end }} |
| 19 | |
| 20 | {{ with .Site }} |
| 21 | {{ reflect.IsPage . }} → false |
| 22 | {{ end }} |
| 23 | ``` |