craft.globals
This document is for a version of Craft CMS that is no longer supported. Please refer to the latest version →
You can get info about your site’s globals via craft.globals
.
# Methods
The following methods are available:
# getAllSets()
Returns an array of all global sets.
# getEditableSets()
Returns an array of all global sets that the current user has permission to edit.
# getTotalSets()
Returns an array of the total number of global sets.
# getTotalEditableSets()
Returns an array of the total number of global sets that the current user has permission to edit.
# getSetById( id, locale )
Returns a global set by its ID, and optionally in a particular locale.
# getSetByHandle( handle, locale )
Returns a global set by its handle, and optionally in a particular locale.