Cheat Sheet: Global Variables

SITE
{{ siteName }}
{{ siteUrl }}

DATE
{{ now.year }}
{{ now.month }}
{{ now.day }}
{{ now|date("M d, Y") }}
{{ now|date_modify("+1 day") }}

USERS

{# UserModel #}

{# Properties #}
{{ currentUser }}  {# null if no user is logged in #}
{{ currentUser.admin }}
{{ currentUser.dateCreated }}
{{ currentUser.dateUpdated }}
{{ currentUser.email }}
{{ currentUser.fullName }}
{{ currentUser.friendlyName }}
{{ currentUser.groups }}
{{ currentUser.firstName }}
{{ currentUser.lastName }}
{{ currentUser.lastLoginDate }}

{{ currentUser.name }}
{{ currentUser.next }}
{{ currentUser.id }}
{{ currentUser.isCurrent }}
{{ currentUser.photoUrl }}
{{ currentUser.preferredLocale }}
{{ currentUser.prev }}
{{ currentUser.status }}  {# active, locked, suspended, pending, archived #}
{{ currentUser.username }}

{# Methods #}
{{ currentUser.can( 'permission' ) }}
{{ currentUser.getFullName() }}
{{ currentUser.getFriendlyName() }}
{{ currentUser.getGroups() }}
{{ currentUser.getName() }}

{% set params = { group: 'authors', order: 'firstName, lastName' } %}
{{ currentUser.getNext( params ) }}
{{ currentUser.getPrev( params ) }}

{{ currentUser.getPhotoUrl( 100 ) }}
{{ currentUser.isInGroup( groupId, UserGroupModel, 'groupHandle' ) }}

{{ loginUrl }}
{{ logoutUrl }}

GLOBALS
{{ globalSetName.fieldName }}

TAGS
{{ craft.assets }}
{{ craft.categories }}
{{ craft.config }}
{{ craft.entries }}
{{ craft.fields }}
{{ craft.feeds }}
{{ craft.request }}
{{ craft.session }}
{{ craft.tags }}
{{ craft.users }}

Don't miss any Craft tips, tricks, and community updates