Skip to content

Commit be4ed4b

Browse files
authored
Add page scope and reserved vars docs that link to system vars
1 parent 01970bc commit be4ed4b

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

content/collections/docs/cascade.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,10 @@ Here we have a page where the title is where we went on vacation last summer. `I
6969
gallery entries where the location is in Italy. Within each image we want the alt tag to say what happened and where.
7070
The gallery entry might have its own `title` of the event (`Visiting the Colosseum`) and then append `in Italy`.
7171

72+
## Page Scope {#page-scope}
7273

73-
## Reserved variables {#reserved}
74-
75-
To help in wrangling the cascade, we've aliased variables into other places. The main example is the `page` array. If
76-
you were to create a variable named `page`, that would override the `page` scope. Don't do that.
74+
To give you more control over the scope of your data, each URLs variables are aliased into the `page` scope. This means that you can access your page's title with `{{ page:title }}` _and_ `{{ title }}`, if it hasn't be overridden in the local scope with another tag.
7775

78-
Here's a list of words we recommend that you don't use as field/variable names.
76+
## Reserved variables {#reserved}
7977

80-
- `page`
81-
- `global`
82-
- `globals`
83-
- `template`
84-
- `slug`
85-
- `settings`
78+
You should always avoid overriding any of the Statamic-provided content variables. View the [full list of system variables](/variables).

0 commit comments

Comments
 (0)