Global variables

Example

Display the current date

{{ now }}

List of all the global variables

Name Type Description
site Site current site. Can not be used by itself. Please refer to the properties of the site
page Page current page. Can not be used by itself. Please refer to the properties of the page
wagon Boolean True if the page is rendered by Wagon or not (i.e. Engine).
session Hash all the variables stored in the current session
params Hash all the GET params of the current request
host String host of the server (+ port if different from 80)
ip_address String IP Address of the computer doing the request
path String HTTP request path
fullpath String HTTP request full path
url String HTTP request url
post? Boolean True if the request is a HTTP post
now Time current time (UTC)
today Date current date
locale String current locale
default_locale String default locale of the current site
locales Array all the locales handled by the current site
© 2024 LocomotiveCMS Terms of use Privacy Policy
Back to top