NEW: Provide helpers for isDev/isTest/isLive in templates

This commit is contained in:
Loz Calver 2021-02-11 11:19:07 +00:00
parent eaadd40c3b
commit 095a3b70f8

View File

@ -1134,6 +1134,9 @@ class Director implements TemplateGlobalProvider
return [ return [
'absoluteBaseURL', 'absoluteBaseURL',
'baseURL', 'baseURL',
'isDev',
'isTest',
'isLive',
'is_ajax', 'is_ajax',
'isAjax' => 'is_ajax', 'isAjax' => 'is_ajax',
'BaseHref' => 'absoluteBaseURL', //@deprecated 3.0 'BaseHref' => 'absoluteBaseURL', //@deprecated 3.0