-
Notifications
You must be signed in to change notification settings - Fork 0
Scopes
Jacob Rogaishio edited this page Apr 11, 2018
·
3 revisions
SimpleCMS makes use of a "scope" or global session array. This array contains information about the current request such as the page and template objects.
On your template index file, you can reference the scope with the following code:
$this->getScope('SCOPENAME')
Replace SCOPENAME with whatever scope you would like to access. An example of the above may be the following:
$this->getScope('page')->getTitle()
The above will return the string title of the current page. Below is a list of acceptable scope names:
- page
- template
Please see the "page" and "template" pages for more detailed information about the available values.