<!--
	This source file is part of the open source project
	ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide)

	@link      https://expressionengine.com/
	@copyright Copyright (c) 2003-2021, Packet Tide, LLC. (https://packettide.com)
	@license   https://expressionengine.com/license Licensed under Apache License, Version 2.0
-->
<!DOCTYPE html>
<html lang="en" dir="ltr">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<title>Single Global Variables — ExpressionEngine 5.4.2 Documentation</title>

		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />

		<link rel="stylesheet" href="../../_assets/default.min.css?v=3">

		<!-- Favicons -->
		<link rel="apple-touch-icon" sizes="180x180" href="../../_assets/images/favicons/apple-touch-icon.png">
		<link rel="icon" type="image/png" sizes="32x32" href="../../_assets/images/favicons/favicon-32x32.png">
		<link rel="icon" type="image/png" sizes="16x16" href="../../_assets/images/favicons/favicon-16x16.png">
		<link rel="manifest" href="../../_assets/images/favicons/site.webmanifest">
		<link rel="mask-icon" href="../../_assets/images/favicons/safari-pinned-tab.svg" color="#2e6abd">
		<link rel="shortcut icon" href="../../_assets/images/favicons/favicon.ico">
		<meta name="msapplication-TileColor" content="#2e6abd">
		<meta name="msapplication-config" content="../../_assets/images/favicons/browserconfig.xml">
		<meta name="theme-color" content="#ffffff">

		<style>.sidebar-toc { visibility: hidden; }</style>
		<noscript><style>.sidebar-toc { visibility: visible; }</style></noscript>
	</head>
	<body>

		<div class="header">
			<div class="header-content">
				<a href="https://docs.expressionengine.com/latest" class="header-logo"><img src="../../_assets/images/ee-logo-white.svg" alt=""></a>
				<a href="https://docs.expressionengine.com/latest" class="header-title">ExpressionEngine Docs</a>

				<nav>
					<a href="https://u.expressionengine.com" class="hide font-monospace">{ee:u}</a>
					<a href="https://expressionengine.com/forums" class="hide">Forums</a>

					<div class="version-button-wrapper">
					<div class="dropdown">
							<a class="" href="#">v5<span class="i-arrow-down"></span></a>
							<div class="dropdown-menu">
								<div class="dropdown-menu-inner">
									<a href="https://docs.expressionengine.com/latest/">v6</a>
									<a class="active" href="https://docs.expressionengine.com/v5/">v5</a>
									<a href="https://docs.expressionengine.com/v4/">v4</a>
									<a href="https://docs.expressionengine.com/v3/">v3</a>
									<a href="https://docs.expressionengine.com/v2/">v2</a>
									<a href="https://docs.expressionengine.com/v1/">v1</a>
								</div>
							</div>
						</div>
						<a href="https://docs.expressionengine.com/downloads/v5" class="download-button"><img src="../../_assets/images/download.svg" alt=""></a>
					</div>
				</nav>

				<div class="hamburger mobile-menu-button" onclick="toggleMobileMenu();">
					<span></span><span></span><span></span>
				</div>
			</div>
		</div>

		<div class="sidebar-container">
			<div class="sidebar">
				<div class="sidebar-search">
				<input type="text" class="search-input" id="docsearch-input" name="search" placeholder="Search">
					<!-- <div class="sidebar-sponsor">
						<p>Sponsored By:</p><img src="" alt="">
					</div> -->
				</div>

				<div class="sidebar-toc">
					<ul><li  class=""><a href="../../index.html">Welcome</a></li><li  class=""><a >Installation & Updates</a><ul><li  class=""><a href="../../installation/requirements.html">System Requirements</a></li><li  class=""><a href="../../installation/installation.html">Installation</a></li><li  class=""><a href="../../installation/best-practices.html">Best Practices</a></li><li  class=""><a href="../../installation/updating.html">Updating</a></li><li  class=""><a href="../../installation/changelog.html">Change Log</a></li></ul></li><li  class=""><a >Getting Started</a><ul><li  class=""><a href="../../getting-started/the-big-picture.html">The Big Picture</a></li><li  class=""><a href="../../getting-started/ten-minute-primer.html">10 Minute Primer</a></li></ul></li><li  class=""><a >General Information</a><ul><li  class=""><a href="../../general/url-structure.html">URL Structure</a></li><li  class=""><a href="../../general/404pages.html">404 Pages</a></li><li  class=""><a href="../../general/database-backup.html">Backing Up Your Site</a></li><li  class=""><a href="../../general/moving.html">Moving to Another Server</a></li><li  class=""><a href="../../general/gdpr.html">GDPR Compliance</a></li><li  class=""><a href="../../general/cookies.html">Cookies</a></li><li  class=""><a href="../../general/date-localization.html">Date Localization</a></li><li  class=""><a href="../../general/languages.html">Language Packs</a></li><li  class=""><a href="../../general/system-configuration-overrides.html">System Config Overrides</a></li><li  class=""><a href="../../general/text-formatting.html">Text Formatting</a></li><li  class=""><a href="../../general/converting-to-innodb.html">Converting to InnoDB</a></li><li  class=""><a href="../../general/bbcode.html">BBCode Reference</a></li><li  class=""><a href="../../general/reserved-words.html">Reserved Words</a></li><li  class=""><a href="../../general/member-import-xml-format.html">Member XML Format</a></li></ul></li><li  class="active"><a >Templates</a><ul><li  class=""><a href="../../templates/overview.html">Overview</a></li><li  class=""><a href="../../templates/language.html">Template Language</a></li><li  class=""><a href="../../templates/conditionals.html">Conditional Tags</a></li><li  class=""><a href="../../templates/embedding.html">Embedding Templates</a></li><li  class=""><a href="../../templates/layouts.html">Template Layouts</a></li><li  class=""><a href="../../templates/partials.html">Template Partials</a></li><li  class=""><a href="../../templates/variable.html">Template Variables</a></li><li  class="active"><a >Global Template Variables</a><ul><li data-active-page="true" class="active"><a href="../../templates/globals/single-variables.html">Single Global Variables</a></li><li  class=""><a href="../../templates/globals/stylesheet.html">Linking to Stylesheets</a></li><li  class=""><a href="../../templates/globals/url-segments.html">URL Segment Variables</a></li><li  class=""><a href="../../templates/globals/consent.html">Consent Variables</a></li><li  class=""><a href="../../templates/globals/path.html">Path Variables</a></li><li  class=""><a href="../../templates/globals/preload-replacement.html">Preload Text Replacements</a></li></ul></li><li  class=""><a href="../../templates/variable-modifiers.html">Variable Modifiers</a></li><li  class=""><a href="../../templates/date-variable-formatting.html">Date Variable Formatting</a></li><li  class=""><a href="../../templates/routes.html">Template Routes</a></li><li  class=""><a href="../../templates/pagination.html">Pagination</a></li><li  class=""><a href="../../templates/engine.html">The Template Engine</a></li></ul></li><li  class=""><a >Channels</a><ul><li  class=""><a href="../../channels/entries.html">Entries Tag</a></li><li  class=""><a href="../../channels/info.html">Channel Information Tag</a></li><li  class=""><a href="../../channels/entry-linking.html">Next/Previous Entries</a></li><li  class=""><a href="../../channels/entry-spanning.html">Spanning Across Pages</a></li><li  class=""><a href="../../channels/entry-tracking.html">Entry Views Tracking</a></li><li  class=""><a href="../../channels/dynamic-parameters.html">Dynamic Parameters</a></li><li  class=""><a href="../../channels/categories.html">Categories Tag</a></li><li  class=""><a href="../../channels/category-archive.html">Category Archive Tag</a></li><li  class=""><a href="../../channels/category-heading.html">Category Heading Tag</a></li><li  class=""><a href="../../channels/archive-months.html">Archive Month Links</a></li><li  class=""><a href="../../channels/sets.html">Channel Sets</a></li><li  class=""><a href="../../channels/calendar.html">Calendar Tag</a></li><li  class=""><a >Channel Form</a><ul><li  class=""><a href="../../channels/channel-form/overview.html">Channel Form Tag</a></li><li  class=""><a href="../../channels/channel-form/examples.html">Examples</a></li><li  class=""><a href="../../channels/channel-form/inputs.html">Form Inputs</a></li><li  class=""><a href="../../channels/channel-form/fields.html">Other Fields</a></li><li  class=""><a href="../../channels/channel-form/status.html">Status Selection</a></li><li  class=""><a href="../../channels/channel-form/categories.html">Category Selection</a></li><li  class=""><a href="../../channels/channel-form/development.html">Development</a></li></ul></li></ul></li><li  class=""><a >Comments</a><ul><li  class=""><a href="../../comment/overview.html">Overview</a></li><li  class=""><a href="../../comment/entries.html">Entries Tag</a></li><li  class=""><a href="../../comment/form.html">Submission Form</a></li><li  class=""><a href="../../comment/subscriptions.html">Subscriptions</a></li><li  class=""><a href="../../comment/control-panel.html">Control Panel</a></li></ul></li><li  class=""><a >Add-Ons</a><ul><li  class=""><a href="../../add-ons/overview.html">Overview</a></li><li  class=""><a href="../../add-ons/blacklist.html">Blacklist / White List</a></li><li  class=""><a href="../../add-ons/consent.html">Consent</a></li><li  class=""><a href="../../add-ons/email.html">Email</a></li><li  class=""><a href="../../add-ons/emoji.html">Emoji</a></li><li  class=""><a href="../../add-ons/file.html">File</a></li><li  class=""><a >Discussion Forum</a><ul><li  class=""><a href="../../add-ons/forum/index.html">Overview</a></li><li  class=""><a href="../../add-ons/forum/setup.html">Setup</a></li><li  class=""><a href="../../add-ons/forum/boards.html">Boards</a></li><li  class=""><a href="../../add-ons/forum/themes.html">Themes</a></li><li  class=""><a href="../../add-ons/forum/global-variables.html">Global Variables</a></li><li  class=""><a href="../../add-ons/forum/user-management.html">User Management</a></li><li  class=""><a href="../../add-ons/forum/channel-forum.html">Associating Channel Entries with Forum Topics</a></li><li  class=""><a href="../../add-ons/forum/recent-topics.html">Recent Forum Topics</a></li><li  class=""><a href="../../add-ons/forum/signatures.html">Signatures and Avatars</a></li><li  class=""><a href="../../add-ons/forum/helper.html">Helper</a></li><li  class=""><a href="../../add-ons/forum/other-features.html">Other Features</a></li></ul></li><li  class=""><a href="../../add-ons/http-header.html">HTTP Header</a></li><li  class=""><a href="../../add-ons/ip-to-nation.html">IP to Nation</a></li><li  class=""><a href="../../add-ons/metaweblog-api.html">Metaweblog API</a></li><li  class=""><a href="../../add-ons/moblog.html">Moblog</a></li><li  class=""><a href="../../add-ons/pages.html">Pages</a></li><li  class=""><a href="../../add-ons/query.html">Query</a></li><li  class=""><a href="../../add-ons/rss.html">RSS</a></li><li  class=""><a href="../../add-ons/rss-parser.html">RSS Parser</a></li><li  class=""><a href="../../add-ons/rte.html">Rich Text Editor</a></li><li  class=""><a >Search</a><ul><li  class=""><a href="../../add-ons/search/index.html">Overview</a></li><li  class=""><a href="../../add-ons/search/simple.html">Simple Form Tag</a></li><li  class=""><a href="../../add-ons/search/advanced.html">Advanced Form Tag</a></li><li  class=""><a href="../../add-ons/search/results.html">Displaying Results</a></li></ul></li><li  class=""><a >Simple Commerce</a><ul><li  class=""><a href="../../add-ons/simple-commerce/index.html">Overview</a></li><li  class=""><a href="../../add-ons/simple-commerce/control-panel.html">Control Panel</a></li><li  class=""><a href="../../add-ons/simple-commerce/email-templates.html">Email Templates</a></li><li  class=""><a href="../../add-ons/simple-commerce/ipn.html">Instant Payment Notification</a></li><li  class=""><a href="../../add-ons/simple-commerce/items.html">Managing Store Items</a></li><li  class=""><a href="../../add-ons/simple-commerce/paypal-settings.html">PayPal Settings</a></li><li  class=""><a href="../../add-ons/simple-commerce/purchases.html">Managing Store Purchases</a></li></ul></li><li  class=""><a href="../../add-ons/spam.html">Spam</a></li><li  class=""><a href="../../add-ons/statistics.html">Statistics</a></li><li  class=""><a href="../../add-ons/emoticon.html">Emoticon (Deprecated)</a></li></ul></li><li  class=""><a >Fieldtypes</a><ul><li  class=""><a href="../../fieldtypes/overview.html">Overview</a></li><li  class=""><a href="../../fieldtypes/date.html">Date</a></li><li  class=""><a href="../../fieldtypes/duration.html">Duration</a></li><li  class=""><a href="../../fieldtypes/email-address.html">Email Address</a></li><li  class=""><a href="../../fieldtypes/file.html">File</a></li><li  class=""><a href="../../fieldtypes/file-grid.html">File Grid</a></li><li  class=""><a href="../../fieldtypes/fluid.html">Fluid</a></li><li  class=""><a href="../../fieldtypes/grid.html">Grid</a></li><li  class=""><a href="../../fieldtypes/relationships.html">Relationships</a></li><li  class=""><a href="../../fieldtypes/rte.html">Rich Text Editor</a></li><li  class=""><a href="../../fieldtypes/select.html">Checkboxes, Radio Buttons, Select, Multiselect</a></li><li  class=""><a href="../../fieldtypes/text.html">Text Input</a></li><li  class=""><a href="../../fieldtypes/textarea.html">Textarea</a></li><li  class=""><a href="../../fieldtypes/toggle.html">Toggle</a></li><li  class=""><a href="../../fieldtypes/url.html">URL</a></li></ul></li><li  class=""><a href="../../member/index.html">Member Management</a></li><li  class=""><a >Control Panel</a><ul><li  class=""><a href="../../control-panel/index.html">The Control Panel</a></li><li  class=""><a href="../../control-panel/overview.html">CP Overview</a></li><li  class=""><a href="../../control-panel/create.html">Create</a></li><li  class=""><a href="../../control-panel/channels.html">Channels</a></li><li  class=""><a href="../../control-panel/entry-manager.html">Entry Manager</a></li><li  class=""><a href="../../control-panel/file-manager.html">File Manager</a></li><li  class=""><a href="../../control-panel/field-manager.html">Field Manager</a></li><li  class=""><a href="../../control-panel/member-manager.html">Member Manager</a></li><li  class=""><a href="../../control-panel/member-profile.html">Member Profile</a></li><li  class=""><a href="../../control-panel/template-manager.html">Template Manager</a></li><li  class=""><a href="../../control-panel/addons-manager.html">Add-On Manager</a></li><li  class=""><a href="../../control-panel/categories.html">Categories</a></li><li  class=""><a href="../../control-panel/utilities.html">Utilities</a></li><li  class=""><a href="../../control-panel/system-logs.html">System Logs</a></li><li  class=""><a >System Settings</a><ul><li  class=""><a href="../../control-panel/settings/index.html">Overview</a></li><li  class=""><a href="../../control-panel/settings/general.html">General Settings</a></li><li  class=""><a href="../../control-panel/settings/avatars.html">Avatar</a></li><li  class=""><a href="../../control-panel/settings/captcha.html">CAPTCHA</a></li><li  class=""><a href="../../control-panel/settings/comments.html">Comment</a></li><li  class=""><a href="../../control-panel/settings/content-design.html">Content & Design</a></li><li  class=""><a href="../../control-panel/settings/consents.html">Consents</a></li><li  class=""><a href="../../control-panel/settings/debug-output.html">Debugging & Output</a></li><li  class=""><a href="../../control-panel/settings/email.html">Outgoing Email</a></li><li  class=""><a href="../../control-panel/settings/hit-tracking.html">Hit Tracking</a></li><li  class=""><a href="../../control-panel/settings/members.html">Member</a></li><li  class=""><a href="../../control-panel/settings/messages.html">Messaging</a></li><li  class=""><a href="../../control-panel/settings/security-privacy.html">Security & Privacy</a></li><li  class=""><a href="../../control-panel/settings/template.html">Template</a></li><li  class=""><a href="../../control-panel/settings/throttling.html">Access Throttling</a></li><li  class=""><a href="../../control-panel/settings/urls.html">URL and Path</a></li><li  class=""><a href="../../control-panel/settings/word-censor.html">Word Censorship</a></li><li  class=""><a href="../../control-panel/settings/html-buttons.html">HTML Buttons</a></li><li  class=""><a href="../../control-panel/settings/menu-manager.html">Menu Manager</a></li></ul></li><li  class=""><a href="../../control-panel/footer.html">CP Footer</a></li></ul></li><li  class=""><a >Security</a><ul><li  class=""><a href="../../security/general-tips.html">Tips</a></li><li  class=""><a href="../../security/captchas.html">Captchas</a></li><li  class=""><a href="../../security/spam-protection.html">Spam Protection</a></li></ul></li><li  class=""><a >Optimization</a><ul><li  class=""><a href="../../optimization/caching.html">Caching and Performance</a></li><li  class=""><a href="../../optimization/handling-extreme-traffic.html">Handling Extreme Traffic</a></li><li  class=""><a href="../../optimization/throttling.html">Throttling</a></li><li  class=""><a href="../../optimization/new-relic.html">New Relic Performance Monitoring</a></li></ul></li><li  class=""><a >Multiple Sites</a><ul><li  class=""><a href="../../msm/overview.html">Overview</a></li><li  class=""><a href="../../msm/code.html">Variables and Parameter</a></li></ul></li><li  class=""><a >Troubleshooting</a><ul><li  class=""><a href="../../troubleshooting/general.html">General</a></li><li  class=""><a href="../../troubleshooting/installation.html">Installation</a></li><li  class=""><a href="../../troubleshooting/templates.html">Templates</a></li><li  class=""><a href="../../troubleshooting/control-panel.html">Control Panel</a></li><li  class=""><a href="../../troubleshooting/channels-and-entries.html">Channels and Entries</a></li><li  class=""><a href="../../troubleshooting/email.html">Email</a></li><li  class=""><a href="../../troubleshooting/simple-commerce-module.html">Simple Commerce Module</a></li><li  class=""><a href="../../troubleshooting/error-messages.html">Error Messages</a></li></ul></li><li  class=""><a >Add-On Development</a><ul><li  class=""><a href="../../development/addon-setup-php-file.html">The addon.setup.php File</a></li><li  class=""><a href="../../development/plugins.html">Plugins</a></li><li  class=""><a href="../../development/modules.html">Modules</a></li><li  class=""><a href="../../development/extensions.html">Extensions</a></li><li  class=""><a >Extension Hooks</a><ul><li  class=""><a >Global</a><ul><li  class=""><a href="../../development/extension-hooks/global/core.html">Core Library</a></li><li  class=""><a href="../../development/extension-hooks/global/email.html">Email Library</a></li><li  class=""><a href="../../development/extension-hooks/global/filemanager.html">Filemanager Library</a></li><li  class=""><a href="../../development/extension-hooks/global/functions.html">Functions Library</a></li><li  class=""><a href="../../development/extension-hooks/global/grid.html">Grid Fieldtype</a></li><li  class=""><a href="../../development/extension-hooks/global/input.html">Input Library</a></li><li  class=""><a href="../../development/extension-hooks/global/member-model.html">Legacy Member Model</a></li><li  class=""><a href="../../development/extension-hooks/global/output.html">Output Library</a></li><li  class=""><a href="../../development/extension-hooks/global/pagination.html">Pagination Library</a></li><li  class=""><a href="../../development/extension-hooks/global/relationships.html">Relationships Fieldtype</a></li><li  class=""><a href="../../development/extension-hooks/global/session.html">Session Library</a></li><li  class=""><a href="../../development/extension-hooks/global/template.html">Template Library</a></li><li  class=""><a href="../../development/extension-hooks/global/text-helper.html">Text Helper</a></li><li  class=""><a href="../../development/extension-hooks/global/typography.html">Typography Library</a></li></ul></li><li  class=""><a >API Libraries</a><ul><li  class=""><a href="../../development/extension-hooks/api/channel-fields.html">Channel Fields API</a></li><li  class=""><a href="../../development/extension-hooks/api/template-structure.html">Template Structure API</a></li></ul></li><li  class=""><a >Control Panel</a><ul><li  class=""><a href="../../development/extension-hooks/cp/admin-content.html">Admin Content Controller</a></li><li  class=""><a href="../../development/extension-hooks/cp/css.html">CSS Controller</a></li><li  class=""><a href="../../development/extension-hooks/cp/design.html">Design Controller</a></li><li  class=""><a href="../../development/extension-hooks/cp/javascript.html">Javascript Controller</a></li><li  class=""><a href="../../development/extension-hooks/cp/login.html">Login Controller</a></li><li  class=""><a href="../../development/extension-hooks/cp/members.html">Members Controller</a></li><li  class=""><a href="../../development/extension-hooks/cp/menu.html">Control Panel Menu</a></li><li  class=""><a href="../../development/extension-hooks/cp/myaccount.html">My Account Controller</a></li><li  class=""><a href="../../development/extension-hooks/cp/publish.html">Publish Controller</a></li></ul></li><li  class=""><a >Models</a><ul><li  class=""><a href="../../development/extension-hooks/model/category-field.html">CategoryField Model</a></li><li  class=""><a href="../../development/extension-hooks/model/category-group.html">CategoryGroup Model</a></li><li  class=""><a href="../../development/extension-hooks/model/category.html">Category Model</a></li><li  class=""><a href="../../development/extension-hooks/model/channel.html">Channel Model</a></li><li  class=""><a href="../../development/extension-hooks/model/channel-entry.html">Channel Entry Model</a></li><li  class=""><a href="../../development/extension-hooks/model/channel-field-group.html">ChannelFieldGroup Model</a></li><li  class=""><a href="../../development/extension-hooks/model/channel-field.html">ChannelField Model</a></li><li  class=""><a href="../../development/extension-hooks/model/channel-form-settings.html">ChannelFormSettings Model</a></li><li  class=""><a href="../../development/extension-hooks/model/channel-layout.html">ChannelLayout Model</a></li><li  class=""><a href="../../development/extension-hooks/model/comment.html">Comment Model</a></li><li  class=""><a href="../../development/extension-hooks/model/file.html">File Model</a></li><li  class=""><a href="../../development/extension-hooks/model/template-global-variable.html">GlobalVariable Model</a></li><li  class=""><a href="../../development/extension-hooks/model/member-field.html">MemberField Model</a></li><li  class=""><a href="../../development/extension-hooks/model/member-group.html">MemberGroup Model</a></li><li  class=""><a href="../../development/extension-hooks/model/member.html">Member Model</a></li><li  class=""><a href="../../development/extension-hooks/model/site.html">Site Model</a></li><li  class=""><a href="../../development/extension-hooks/model/template-snippet.html">Snippet Model</a></li><li  class=""><a href="../../development/extension-hooks/model/template-specialty-template.html">SpecialityTemplate Model</a></li><li  class=""><a href="../../development/extension-hooks/model/status.html">Status Model</a></li><li  class=""><a href="../../development/extension-hooks/model/template-group.html">TemplateGroup Model</a></li><li  class=""><a href="../../development/extension-hooks/model/template-route.html">TemplateRoute Model</a></li><li  class=""><a href="../../development/extension-hooks/model/template.html">Template Model</a></li></ul></li><li  class=""><a >Modules</a><ul><li  class=""><a href="../../development/extension-hooks/module/channel.html">Channel Module</a></li><li  class=""><a href="../../development/extension-hooks/module/channel-form.html">Channel Form</a></li><li  class=""><a href="../../development/extension-hooks/module/comment.html">Comment Module</a></li><li  class=""><a href="../../development/extension-hooks/module/email.html">Email Module</a></li><li  class=""><a href="../../development/extension-hooks/module/forum.html">Forum Module</a></li><li  class=""><a href="../../development/extension-hooks/module/member.html">Member Module</a></li><li  class=""><a href="../../development/extension-hooks/module/member-auth.html">Member Module Authorization</a></li><li  class=""><a href="../../development/extension-hooks/module/member-register.html">Member Module Registration</a></li><li  class=""><a href="../../development/extension-hooks/module/member-settings.html">Member Module Settings</a></li><li  class=""><a href="../../development/extension-hooks/module/search.html">Search Module</a></li><li  class=""><a href="../../development/extension-hooks/module/simple-commerce.html">Simple Commerce Module</a></li><li  class=""><a href="../../development/extension-hooks/module/wiki.html">Wiki Module</a></li></ul></li></ul></li><li  class=""><a href="../../development/fieldtypes.html">Fieldtypes</a></li><li  class=""><a href="../../development/architecture.html">Architecture</a></li><li  class=""><a >Services</a><ul><li  class=""><a href="../../development/services/addon.html">Addon Service</a></li><li  class=""><a href="../../development/services/alert.html">CP/Alert Service</a></li><li  class=""><a href="../../development/services/config.html">Config Service</a></li><li  class=""><a href="../../development/services/consent.html">Consent Service</a></li><li  class=""><a href="../../development/services/cookie.html">Cookie</a></li><li  class=""><a href="../../development/services/csv.html">CSV Library</a></li><li  class=""><a href="../../development/services/encrypt.html">Encrypt Service</a></li><li  class=""><a href="../../development/services/event.html">Event Service</a></li><li  class=""><a href="../../development/services/filepicker.html">CP/FilePicker Service</a></li><li  class=""><a href="../../development/services/filter.html">CP/Filter Service</a></li><li  class=""><a >Format Service</a><ul><li  class=""><a href="../../development/services/format.html">Format</a></li><li  class=""><a href="../../development/services/format/number.html">Number Formatter</a></li><li  class=""><a href="../../development/services/format/text.html">Text Formatter</a></li></ul></li><li  class=""><a href="../../development/services/ipaddress.html">IP Address Service</a></li><li  class=""><a href="../../development/services/live-preview.html">LivePreview Service</a></li><li  class=""><a href="../../development/services/memory.html">Memory Service</a></li><li  class=""><a href="../../development/services/modal.html">CP/Modal Service</a></li><li  class=""><a >Model Service</a><ul><li  class=""><a href="../../development/services/model.html">Model</a></li><li  class=""><a href="../../development/services/model/fetching.html">Fetching Models</a></li><li  class=""><a href="../../development/services/model/relationships.html">Relationships</a></li><li  class=""><a href="../../development/services/model/collection.html">Collections</a></li><li  class=""><a href="../../development/services/model/building-your-own.html">Building your own Models</a></li><li  class=""><a href="../../development/services/model/relating-models.html">Relating Models</a></li></ul></li><li  class=""><a href="../../development/services/pagination.html">CP/Pagination Service</a></li><li  class=""><a href="../../development/services/permission.html">Permission Service</a></li><li  class=""><a href="../../development/services/sidebar.html">CP/Sidebar Service</a></li><li  class=""><a href="../../development/services/spam.html">Spam Service</a></li><li  class=""><a href="../../development/services/table.html">CP/Table Service</a></li><li  class=""><a href="../../development/services/url.html">CP/URL Service</a></li><li  class=""><a href="../../development/services/validation.html">Validation Service</a></li><li  class=""><a href="../../development/services/view.html">View Service</a></li></ul></li><li  class=""><a href="../../development/tree-datastructure.html">Tree Datastructure</a></li><li  class=""><a href="../../development/shared-form-view.html">Shared Form View</a></li><li  class=""><a href="../../development/rte-tools.html">RTE Tools API</a></li><li  class=""><a >Control Panel Javascript</a><ul><li  class=""><a href="../../development/control-panel-js/events.html">Custom jQuery Events</a></li><li  class=""><a href="../../development/control-panel-js/table.html">Table Plugin</a></li><li  class=""><a href="../../development/control-panel-js/rich-text-editor.html">Rich Text Editor</a></li><li  class=""><a href="../../development/control-panel-js/rangesandselections.html">Ranges and Selections</a></li><li  class=""><a href="../../development/control-panel-js/wysihat-api.html">WysiHat API</a></li></ul></li><li  class=""><a href="../../development/constants.html">Constants Reference</a></li><li  class=""><a href="../../development/json-version-feed.html">JSON Version Feed</a></li><li  class=""><a >Legacy Reference</a><ul><li  class=""><a href="../../development/legacy/common-functions.html">Common Functions</a></li><li  class=""><a href="../../development/legacy/controllers.html">Controllers</a></li><li  class=""><a href="../../development/legacy/drivers.html">Drivers</a></li><li  class=""><a href="../../development/legacy/libraries/index.html">Libraries</a><ul><li  class=""><a href="../../development/legacy/libraries/creating-libraries.html">Creating Libraries</a></li><li  class=""><a href="../../development/legacy/libraries/benchmark.html">Benchmarking Class</a></li><li  class=""><a href="../../development/legacy/libraries/cache.html">Cache Class</a></li><li  class=""><a href="../../development/legacy/libraries/config.html">Config Class</a></li><li  class=""><a href="../../development/legacy/libraries/cp.html">CP Class</a></li><li  class=""><a href="../../development/legacy/libraries/database.html">Database Class</a></li><li  class=""><a href="../../development/legacy/libraries/email.html">Email Class</a></li><li  class=""><a href="../../development/legacy/libraries/file-uploading.html">File Uploading Class</a></li><li  class=""><a href="../../development/legacy/libraries/form-validation.html">Form Validation Class</a></li><li  class=""><a href="../../development/legacy/libraries/functions.html">Functions Class</a></li><li  class=""><a href="../../development/legacy/libraries/image-lib.html">Image Manipulation Class</a></li><li  class=""><a href="../../development/legacy/libraries/input.html">Input Class</a></li><li  class=""><a href="../../development/legacy/libraries/javascript.html">Javascript Class</a></li><li  class=""><a href="../../development/legacy/libraries/language.html">Language Class</a></li><li  class=""><a href="../../development/legacy/libraries/layout.html">Layout Class</a></li><li  class=""><a href="../../development/legacy/libraries/loader.html">Loader Class</a></li><li  class=""><a href="../../development/legacy/libraries/localization.html">Localize Class</a></li><li  class=""><a href="../../development/legacy/libraries/logger.html">Logger Class</a></li><li  class=""><a href="../../development/legacy/libraries/mime-type.html">Mime Type Class</a></li><li  class=""><a href="../../development/legacy/libraries/output.html">Output Class</a></li><li  class=""><a href="../../development/legacy/libraries/pagination.html">Pagination Class</a></li><li  class=""><a href="../../development/legacy/libraries/rss-parser.html">RSS Parser Class</a></li><li  class=""><a href="../../development/legacy/libraries/security.html">Security Class</a></li><li  class=""><a href="../../development/legacy/libraries/session.html">Session Class</a></li><li  class=""><a href="../../development/legacy/libraries/table.html">Table Class</a></li><li  class=""><a href="../../development/legacy/libraries/template.html">Template Class</a></li><li  class=""><a href="../../development/legacy/libraries/typography.html">Typography Class</a></li><li  class=""><a href="../../development/legacy/libraries/uri.html">URI Class</a></li><li  class=""><a href="../../development/legacy/libraries/xmlparser.html">XML Parser Class</a></li></ul></li><li  class=""><a href="../../development/legacy/database/index.html">Database Driver</a><ul><li  class=""><a href="../../development/legacy/database/active-record.html">Active Record</a></li><li  class=""><a href="../../development/legacy/database/results.html">Query Results</a></li><li  class=""><a href="../../development/legacy/database/raw.html">Raw Queries and Metadata</a></li><li  class=""><a href="../../development/legacy/database/utilities.html">Database Utility Class</a></li><li  class=""><a href="../../development/legacy/database/forge.html">Database Forge Class</a></li><li  class=""><a href="../../development/legacy/database/connecting-to-an-external-database.html">Connecting to an External Database</a></li></ul></li><li  class=""><a href="../../development/legacy/helpers/index.html">Helpers</a><ul><li  class=""><a href="../../development/legacy/helpers/array-helper.html">Array Helper</a></li><li  class=""><a href="../../development/legacy/helpers/cookie-helper.html">Cookie Helper</a></li><li  class=""><a href="../../development/legacy/helpers/directory-helper.html">Directory Helper</a></li><li  class=""><a href="../../development/legacy/helpers/download-helper.html">Download Helper</a></li><li  class=""><a href="../../development/legacy/helpers/file-helper.html">File Helper</a></li><li  class=""><a href="../../development/legacy/helpers/form-helper.html">Form Helper</a></li><li  class=""><a href="../../development/legacy/helpers/html-helper.html">HTML Helper</a></li><li  class=""><a href="../../development/legacy/helpers/language-helper.html">Language Helper</a></li><li  class=""><a href="../../development/legacy/helpers/number-helper.html">Number Helper</a></li><li  class=""><a href="../../development/legacy/helpers/path-helper.html">Path Helper</a></li><li  class=""><a href="../../development/legacy/helpers/security-helper.html">Security Helper</a></li><li  class=""><a href="../../development/legacy/helpers/string-helper.html">String Helper</a></li><li  class=""><a href="../../development/legacy/helpers/text-helper.html">Text Helper</a></li><li  class=""><a href="../../development/legacy/helpers/url-helper.html">URL Helper</a></li><li  class=""><a href="../../development/legacy/helpers/xml-helper.html">XML Helper</a></li></ul></li><li  class=""><a href="../../development/legacy/api/index.html">Legacy API Library</a><ul><li  class=""><a href="../../development/legacy/api/api-channel-categories.html">Channel Categories API</a></li><li  class=""><a href="../../development/legacy/api/api-channel-fields.html">Channel Fields API</a></li><li  class=""><a href="../../development/legacy/api/api-channel-structure.html">Channel Structure API</a></li><li  class=""><a href="../../development/legacy/api/api-template-structure.html">Template Structure API</a></li></ul></li></ul></li><li  class=""><a >Guidelines</a><ul><li  class=""><a href="../../development/guidelines/index.html">Overview</a></li><li  class=""><a href="../../development/guidelines/checklist.html">Guidelines Checklist</a></li><li  class=""><a href="../../development/guidelines/general.html">General Style and Syntax</a></li><li  class=""><a href="../../development/guidelines/in-app-documentation.html">In-app Documentation</a></li><li  class=""><a href="../../development/guidelines/performance.html">Performance Guidelines</a></li><li  class=""><a href="../../development/guidelines/security.html">Security Guidelines</a></li><li  class=""><a href="../../development/guidelines/view-php-syntax.html">View Files and PHP Syntax</a></li></ul></li><li  class=""><a href="../../development/v4-addon-migration.html">v4 Add-on Migration</a></li><li  class=""><a href="../../development/v3-add-on-migration.html">v3 Add-on Migration</a></li></ul></li><li  class=""><a href="../../bugs-and-security-reports.html">Bugs and Security Reports</a></li><li  class=""><a href="../../style-guide.html">Docs Style Guide</a></li></ul>
				</div>
			</div>
		</div>

		<section class="docs-content-wrapper">
			<div class="content" id="docsearch-content">
				<!--
    This source file is part of the open source project
    ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide)

    @link      https://expressionengine.com/
    @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://www.packettide.com)
    @license   https://expressionengine.com/license Licensed under Apache License, Version 2.0
-->


		<h1>
		<span class="anchor" id="single-global-variables"></span>
		<a href="#single-global-variables">Single Global Variables</a>
		</h1><div class="table-of-contents"><ul>
<li><a href="#variables">Variables</a></li>
<li><a href="#member-variables">Member Variables</a></li>
</ul>
</div><p>These Global Variables can be used anywhere within your Templates. Note that they are subject to ExpressionEngine’s <a href="../../templates/engine.html">parsing order</a>, which can affect their availability when used inside other tags.</p>
		<h2>
		<span class="anchor" id="variables"></span>
		<a href="#variables">Variables</a>
		</h2><div class="table-of-contents collapse"><div class="toc-overview-button">Show List</div><ul>
<li><a href="#app_build"><code>{app_build}</code></a></li>
<li><a href="#app_version"><code>{app_version}</code></a></li>
<li><a href="#charset"><code>{charset}</code></a></li>
<li><a href="#cp_session_id"><code>{cp_session_id}</code></a></li>
<li><a href="#cp_url"><code>{cp_url}</code></a></li>
<li><a href="#csrf_token"><code>{csrf_token}</code></a></li>
<li><a href="#current_path"><code>{current_path}</code></a></li>
<li><a href="#current_time"><code>{current_time}</code></a></li>
<li><a href="#current_query_string"><code>{current_query_string}</code></a></li>
<li><a href="#current_url"><code>{current_url}</code></a></li>
<li><a href="#debug_mode"><code>{debug_mode}</code></a></li>
<li><a href="#doc_url"><code>{doc_url}</code></a></li>
<li><a href="#elapsed_time"><code>{elapsed_time}</code></a></li>
<li><a href="#embed"><code>{embed</code>}</a></li>
<li><a href="#encode"><code>{encode}</code></a></li>
<li><a href="#gzip_mode"><code>{gzip_mode}</code></a></li>
<li><a href="#hits"><code>{hits}</code></a></li>
<li><a href="#homepage"><code>{homepage}</code></a></li>
<li><a href="#is_ajax_request"><code>{is_ajax_request}</code></a></li>
<li><a href="#is_live_preview_request"><code>{is_live_preview_request}</code></a></li>
<li><a href="#lang"><code>{lang}</code></a></li>
<li><a href="#layout"><code>{layout}</code></a></li>
<li><a href="#member_group"><code>{member_group}</code></a></li>
<li><a href="#member_profile_link"><code>{member_profile_link}</code></a></li>
<li><a href="#password_max_length"><code>{password_max_length}</code></a></li>
<li><a href="#redirect"><code>{redirect}</code></a></li>
<li><a href="#site_description"><code>{site_description}</code></a></li>
<li><a href="#site_name"><code>{site_name}</code></a></li>
<li><a href="#site_url"><code>{site_url}</code></a></li>
<li><a href="#template_name"><code>{template_name}</code></a></li>
<li><a href="#template_group"><code>{template_group}</code></a></li>
<li><a href="#template_id"><code>{template_id}</code></a></li>
<li><a href="#template_type"><code>{template_type}</code></a></li>
<li><a href="#template_edit_date"><code>{template_edit_date}</code></a></li>
<li><a href="#theme_folder_url"><code>{theme_folder_url}</code></a></li>
<li><a href="#theme_user_folder_url"><code>{theme_user_folder_url}</code></a></li>
<li><a href="#total_queries"><code>{total_queries}</code></a></li>
<li><a href="#variable_time"><code>{variable_time}</code></a></li>
<li><a href="#webmaster_email"><code>{webmaster_email}</code></a></li>
</ul>
</div>
		<h3>
		<span class="anchor" id="app_build"></span>
		<a href="#app_build"><code>{app_build}</code></a>
		</h3><p>The build date of ExpressionEngine that you are using.</p>
		<h3>
		<span class="anchor" id="app_version"></span>
		<a href="#app_version"><code>{app_version}</code></a>
		</h3><p>The version of ExpressionEngine that you are using (2.2.0, 2.3.0, etc.).</p>
		<h3>
		<span class="anchor" id="charset"></span>
		<a href="#charset"><code>{charset}</code></a>
		</h3><p>This variable will be substituted for the global character set (UTF-8). It is typically used in your META tags to indicate the character encoding:</p><pre><code><span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"Content-Type"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"text/html; charset=</span></span></span><span class="hljs-template-tag">{<span class="hljs-name">charset</span>}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span> /&gt;</span></span></code></pre>
		<h3>
		<span class="anchor" id="cp_session_id"></span>
		<a href="#cp_session_id"><code>{cp_session_id}</code></a>
		</h3><p>The session id for the control panel. This is the value needed in the “S=” portion of the control panel URL. Only output for logged-in members who have access to the Control Panel, for instance to build a front-end URL to an add-on in the control panel:</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name"><span class="hljs-keyword">if</span></span> logged_in_group_id == <span class="hljs-number">1</span>}</span><span class="xml">
  &amp;bull; <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"</span></span></span><span class="hljs-template-tag">{<span class="hljs-name">cp_url</span>}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">?/cp/addons/settings/my_addon&amp;S=</span></span></span><span class="hljs-template-tag">{<span class="hljs-name">cp_session_id</span>}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
</span><span class="hljs-template-tag">{/<span class="hljs-name"><span class="hljs-keyword">if</span></span>}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="cp_url"></span>
		<a href="#cp_url"><code>{cp_url}</code></a>
		</h3><p>The URL to the control panel for this site. Only output for logged-in members who have access to the Control Panel.</p>
		<h3>
		<span class="anchor" id="csrf_token"></span>
		<a href="#csrf_token"><code>{csrf_token}</code></a>
		</h3><p>This variable is a required value for the hidden form field ‘csrf_token’.</p>
		<h3>
		<span class="anchor" id="current_path"></span>
		<a href="#current_path"><code>{current_path}</code></a>
		</h3><p>This variable outputs the current URI path relative to your ExpressionEngine installation, e.g. <em>news/article/man-captures-all-the-rabbits</em>.</p><p class="alert alert--warn"> <strong>Note:</strong> If there are no URL segments, this will output a slash: <em>/</em></p>
		<h3>
		<span class="anchor" id="current_time"></span>
		<a href="#current_time"><code>{current_time}</code></a>
		</h3><p>This variable displays the current server time localized to each user’s particular setting. As with other date variables, you will use the standard <a href="../../templates/date-variable-formatting.html">date variable formatting</a>:</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">current_time</span> <span class="hljs-attr">format</span>=<span class="hljs-string">"%Y %m %d %H:%i:%s"</span>}</span><span class="xml"></span></code></pre><p class="alert alert--warn"> <strong>Note:</strong> Unlike the rest of the Standard Global Variables, <code>{current_time}</code> is parsed very early on in the Template parser, which allows you to make dynamic use of it in your tags, for instance as a tag parameter, or in a conditional.</p>
		<h3>
		<span class="anchor" id="current_query_string"></span>
		<a href="#current_query_string"><code>{current_query_string}</code></a>
		</h3><p>This variable displays the current security-filtered query string, which can be useful to append to your path variables when you want a link to retain the current query string, e.g.:</p><pre><code>gclid=1123581321</code></pre><p class="alert alert--warn"> <strong>Note:</strong> This variable has already been URL encoded so all characters are transported safely and ready to append to URLs as needed.</p>
		<h3>
		<span class="anchor" id="current_url"></span>
		<a href="#current_url"><code>{current_url}</code></a>
		</h3><p>This variable displays the full current URL.</p>
		<h3>
		<span class="anchor" id="debug_mode"></span>
		<a href="#debug_mode"><code>{debug_mode}</code></a>
		</h3><p>This variable will be substituted with either “on” or “off” based on your debug mode settings.</p>
		<h3>
		<span class="anchor" id="doc_url"></span>
		<a href="#doc_url"><code>{doc_url}</code></a>
		</h3><p>This variable will be substituted with the user guide URL.</p>
		<h3>
		<span class="anchor" id="elapsed_time"></span>
		<a href="#elapsed_time"><code>{elapsed_time}</code></a>
		</h3><p>The amount of time, in seconds, it took ExpressionEngine to render the current page.</p>
		<h3>
		<span class="anchor" id="embed"></span>
		<a href="#embed"><code>{embed</code>}</a>
		</h3><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">embed</span>=<span class="hljs-string">'news/local'</span>}</span><span class="xml"></span></code></pre><p>This variable allows you to embed one Template within another. Please see the <a href="../../templates/embedding.html">Embedded Templates</a> section.</p>
		<h3>
		<span class="anchor" id="encode"></span>
		<a href="#encode"><code>{encode}</code></a>
		</h3><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">encode</span>=<span class="hljs-string">"you@example.com"</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"Email Me!"</span>}</span><span class="xml"></span></code></pre><p>This variable will encode the specified email address using javascript and HTML entities to make it more difficult for spam harvesters to grab an email address from your site. If you normally show your email address on your site you are encouraged to use this variable. The title parameter on the variable allows you to specify the text you want to use for the link.</p><pre><code>Email Me!</code></pre>
		<h3>
		<span class="anchor" id="gzip_mode"></span>
		<a href="#gzip_mode"><code>{gzip_mode}</code></a>
		</h3><p>This variable will be substituted with either “on” or “off” based on your output compression settings mode settings.</p>
		<h3>
		<span class="anchor" id="hits"></span>
		<a href="#hits"><code>{hits}</code></a>
		</h3><p>This variable will be substituted with the number of hits that any given template containing the variable has received.</p>
		<h3>
		<span class="anchor" id="homepage"></span>
		<a href="#homepage"><code>{homepage}</code></a>
		</h3><p>This variable will be substituted with the <strong>URL to the root directory of your site</strong> preference under <code>Settings --&gt; URL and Path Settings</code>.</p>
		<h3>
		<span class="anchor" id="is_ajax_request"></span>
		<a href="#is_ajax_request"><code>{is_ajax_request}</code></a>
		</h3><p>Boolean (TRUE/FALSE) variable representing whether or not the template is being accessed via an Ajax request (XMLHttpRequest header). Most commonly this would be used to prevent direct access of template stubs used as content providers for Ajax, e.g.:</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name"><span class="hljs-keyword">if</span></span> ! is_ajax_request}</span><span class="xml">
  </span><span class="hljs-template-tag">{<span class="hljs-name">redirect</span>=<span class="hljs-string">"404"</span>}</span><span class="xml">
</span><span class="hljs-template-tag">{/<span class="hljs-name"><span class="hljs-keyword">if</span></span>}</span><span class="xml">

</span><span class="hljs-comment">{!-- ExpressionEngine tags below to define content to return --}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="is_live_preview_request"></span>
		<a href="#is_live_preview_request"><code>{is_live_preview_request}</code></a>
		</h3><p>Boolean (TRUE/FALSE) variable representing whether or not the current request is a Live Preview from the control panel. Most commonly you would use this to add/hide information on your preview page for content authors:</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name"><span class="hljs-keyword">if</span></span> is_live_preview_request}</span><span class="xml">
  </span><span class="hljs-comment">{!-- include sample rendering of a social share, Twitter card, FB post, etc. --}</span><span class="xml">
</span><span class="hljs-template-tag">{/<span class="hljs-name"><span class="hljs-keyword">if</span></span>}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="lang"></span>
		<a href="#lang"><code>{lang}</code></a>
		</h3><p>This variable will be substituted for the <strong>Default XML Language</strong> preference under <code>Settings --&gt; General Settings</code>.</p>
		<h3>
		<span class="anchor" id="layout"></span>
		<a href="#layout"><code>{layout}</code></a>
		</h3><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">layout</span>=<span class="hljs-string">"news/local"</span>}</span><span class="xml"></span></code></pre><p>This variable allows you to wrap a Template in another. Please see the <a href="../../templates/layouts.html">Template Layouts</a> section.</p>
		<h3>
		<span class="anchor" id="member_group"></span>
		<a href="#member_group"><code>{member_group}</code></a>
		</h3><p>The Member Group ID number for the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="member_profile_link"></span>
		<a href="#member_profile_link"><code>{member_profile_link}</code></a>
		</h3><p>This variable will be substituted with a link to the public profile page for the currently logged in user. The text of the link will be the member’s screen name. For instance, the output might be:</p><pre><code><span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://example.com/member/1/"</span>&gt;</span>Joe Smith<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span></code></pre>
		<h3>
		<span class="anchor" id="password_max_length"></span>
		<a href="#password_max_length"><code>{password_max_length}</code></a>
		</h3><p>This variable is used the <code>maxlength</code> property of password inputs on login forms:</p><pre><code><span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"password"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"password"</span> <span class="hljs-attr">maxlength</span>=<span class="hljs-string">"</span></span></span><span class="hljs-template-tag">{<span class="hljs-name">password_max_length</span>}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span> <span class="hljs-attr">autocomplete</span>=<span class="hljs-string">'off'</span> /&gt;</span></span></code></pre>
		<h3>
		<span class="anchor" id="redirect"></span>
		<a href="#redirect"><code>{redirect}</code></a>
		</h3><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">redirect</span>=<span class="hljs-string">'news/local'</span> <span class="hljs-attr">status_code</span>=<span class="hljs-string">"301"</span>}</span><span class="xml"></span></code></pre><p>This variable allows you redirect the visitor to another template. Typically this will mean that you will be utilizing the tag within conditionals.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name"><span class="hljs-keyword">if</span></span> segment_3 != <span class="hljs-string">'cookies'</span>}</span><span class="xml">   </span><span class="hljs-template-tag">{<span class="hljs-name">redirect</span>=<span class="hljs-string">'bake/cookies'</span>}</span><span class="xml"> </span><span class="hljs-template-tag">{/<span class="hljs-name"><span class="hljs-keyword">if</span></span>}</span><span class="xml"></span></code></pre><p>You can also use the redirect variable to provide tighter control of your URLs, and trigger 404 pages in certain conditions. When you want to display your 404 page, just use “404” for the template. For instance, you might do this on a template group’s ‘index’ template that you do not wish to be displayed if an arbitrary second URL segment exists.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name"><span class="hljs-keyword">if</span></span> segment_2 != <span class="hljs-string">''</span>}</span><span class="xml">   </span><span class="hljs-template-tag">{<span class="hljs-name">redirect</span>=<span class="hljs-string">"404"</span>}</span><span class="xml"> </span><span class="hljs-template-tag">{/<span class="hljs-name"><span class="hljs-keyword">if</span></span>}</span><span class="xml"></span></code></pre><p>Be careful that through your redirect variables that you do not create an infinite loop.</p><p>The <code>status_code</code> parameter lets you optionally pass a <a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection">3xx redirect code</a> (e.g. 301, 302).</p>
		<h3>
		<span class="anchor" id="site_description"></span>
		<a href="#site_description"><code>{site_description}</code></a>
		</h3><p>Available to MSM sites only, this variable will be substituted with your site’s description as defined under <code>Developer --&gt; Site Manager</code>.</p>
		<h3>
		<span class="anchor" id="site_name"></span>
		<a href="#site_name"><code>{site_name}</code></a>
		</h3><p>This variable will be substituted with your site name as defined under <code>Settings --&gt; General Settings</code>.</p>
		<h3>
		<span class="anchor" id="site_url"></span>
		<a href="#site_url"><code>{site_url}</code></a>
		</h3><p>This variable will be substituted with your site URL as defined under <code>Settings --&gt; URL and Path Settings</code>.</p>
		<h3>
		<span class="anchor" id="template_name"></span>
		<a href="#template_name"><code>{template_name}</code></a>
		</h3><p>This variable displays the name of the template currently being processed.:</p>
		<h3>
		<span class="anchor" id="template_group"></span>
		<a href="#template_group"><code>{template_group}</code></a>
		</h3><p>This variable displays the name of the template group for the template currently being processed.:</p>
		<h3>
		<span class="anchor" id="template_id"></span>
		<a href="#template_id"><code>{template_id}</code></a>
		</h3><p>This variable displays the numeric ID of the template currently being processed.</p>
		<h3>
		<span class="anchor" id="template_type"></span>
		<a href="#template_type"><code>{template_type}</code></a>
		</h3><p>This variable displays the <a href="../../control-panel/template-manager.html#edit-template">type</a> of the template currently being processed (e.g. “webpage”, “rss”, “xml”, etc.).</p>
		<h3>
		<span class="anchor" id="template_edit_date"></span>
		<a href="#template_edit_date"><code>{template_edit_date}</code></a>
		</h3><p>This variable displays the localized time for when the template was last updated. As with other date variables, you will use the standard <a href="../../templates/date-variable-formatting.html">date variable formatting</a>:</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">template_edit_date</span> <span class="hljs-attr">format</span>=<span class="hljs-string">"%Y %m %d %H:%i:%s"</span>}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="theme_folder_url"></span>
		<a href="#theme_folder_url"><code>{theme_folder_url}</code></a>
		</h3><p>The URL to your theme/ee folder.</p>
		<h3>
		<span class="anchor" id="theme_user_folder_url"></span>
		<a href="#theme_user_folder_url"><code>{theme_user_folder_url}</code></a>
		</h3><p>The URL to your theme/user folder.</p>
		<h3>
		<span class="anchor" id="total_queries"></span>
		<a href="#total_queries"><code>{total_queries}</code></a>
		</h3><p>The total number of database queries used to generate the current page.</p>
		<h3>
		<span class="anchor" id="variable_time"></span>
		<a href="#variable_time"><code>{variable_time}</code></a>
		</h3><p>This variable accepts a date parameter in the form of a human readable date, including <code>relative_dates</code>. Some examples of valid <code>date=</code> values:</p><ul>
<li><code>date=&#39;2018-04-30&#39;</code></li>
<li><code>date=&#39;April 30, 2018&#39;</code></li>
<li><code>date=&#39;+2 weeks&#39;</code></li>
<li><code>date=&#39;2 days ago&#39;</code></li>
<li><code>date=&#39;next Monday&#39;</code></li>
</ul>
<p>The result is a standard ExpressionEngine date variable, and can use all <a href="../../templates/date-variable-formatting.html">date variable formatting</a> and comparisons available to other date variables. In the case of <code>:relative</code> dates, the date is relative to the current user’s localized time. If no date parameter is give, the tag works just like the <code>{current_time}</code> variable.</p><p>Given a current date of April 12, 2018, see the following examples:</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">variable_time</span> <span class="hljs-attr">date</span>=<span class="hljs-string">"2 days ago"</span> <span class="hljs-attr">format</span>=<span class="hljs-string">"%F %d, %Y"</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- April 10, 2018 --}</span><span class="xml">

</span><span class="hljs-template-tag">{<span class="hljs-name">variable_time:relative</span> <span class="hljs-attr">date</span>=<span class="hljs-string">'2018-10-25'</span> <span class="hljs-attr">units</span>=<span class="hljs-string">'days'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- in 197 days --}</span><span class="xml">

</span><span class="hljs-template-tag">{<span class="hljs-name">variable_time</span> <span class="hljs-attr">date</span>=<span class="hljs-string">'{segment_3}-{segment_4}'</span> <span class="hljs-attr">format</span>=<span class="hljs-string">'%F'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- April (given a URL of https://example.com/news/archive/2018/04) --}</span><span class="xml">

</span><span class="hljs-template-tag">{<span class="hljs-name"><span class="hljs-keyword">if</span></span> <span class="hljs-string">"{variable_time date='2 weeks ago' format='%U'}"</span> &gt;= <span class="hljs-string">"{variable_time date='2018-04-12'}"</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- TRUE, if the current date is within 2 weeks of April 12, 2018. This works because both are output as Unix timestamps allowing basic &lt;, &gt;, =  for chronological comparisons. --}</span><span class="xml"></span></code></pre><p class="alert alert--warn"> <strong>Note:</strong> Like the <code>{current_time}</code> variable, <code>{variable_time}</code> is available to use as a tag parameter.</p>
		<h3>
		<span class="anchor" id="webmaster_email"></span>
		<a href="#webmaster_email"><code>{webmaster_email}</code></a>
		</h3><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">encode</span>=<span class="hljs-string">"{webmaster_email}"</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"Contact Us"</span>}</span><span class="xml"></span></code></pre><p>The email address for the site, as specified in <a href="../../control-panel/settings/email.html">Email Configuration</a>.</p>
		<h2>
		<span class="anchor" id="member-variables"></span>
		<a href="#member-variables">Member Variables</a>
		</h2><div class="table-of-contents"><ul>
<li><a href="#logged_in_email"><code>{logged_in_email}</code></a></li>
<li><a href="#logged_in_group_description"><code>{logged_in_group_description}</code></a></li>
<li><a href="#logged_in_group_id"><code>{logged_in_group_id}</code></a></li>
<li><a href="#logged_in_group_title"><code>{logged_in_group_title}</code></a></li>
<li><a href="#logged_in_ip_address"><code>{logged_in_ip_address}</code></a></li>
<li><a href="#logged_in_member_id"><code>{logged_in_member_id}</code></a></li>
<li><a href="#logged_in_private_messages"><code>{logged_in_private_messages}</code></a></li>
<li><a href="#logged_in_screen_name"><code>{logged_in_screen_name}</code></a></li>
<li><a href="#logged_in_total_comments"><code>{logged_in_total_comments}</code></a></li>
<li><a href="#logged_in_total_entries"><code>{logged_in_total_entries}</code></a></li>
<li><a href="#logged_in_total_forum_posts"><code>{logged_in_total_forum_posts}</code></a></li>
<li><a href="#logged_in_total_forum_replies"><code>{logged_in_total_forum_replies}</code></a></li>
<li><a href="#logged_in_total_forum_topics"><code>{logged_in_total_forum_topics}</code></a></li>
<li><a href="#logged_in_username"><code>{logged_in_username}</code></a></li>
</ul>
</div>
		<h3>
		<span class="anchor" id="logged_in_email"></span>
		<a href="#logged_in_email"><code>{logged_in_email}</code></a>
		</h3><p>The email address for the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_group_description"></span>
		<a href="#logged_in_group_description"><code>{logged_in_group_description}</code></a>
		</h3><p>The Member Group description for the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_group_id"></span>
		<a href="#logged_in_group_id"><code>{logged_in_group_id}</code></a>
		</h3><p>The Member Group ID number for the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_group_title"></span>
		<a href="#logged_in_group_title"><code>{logged_in_group_title}</code></a>
		</h3><p>The title of the member group for the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_ip_address"></span>
		<a href="#logged_in_ip_address"><code>{logged_in_ip_address}</code></a>
		</h3><p>This variable will be substituted with the IP address of the currently logged in user.</p>
		<h3>
		<span class="anchor" id="logged_in_member_id"></span>
		<a href="#logged_in_member_id"><code>{logged_in_member_id}</code></a>
		</h3><p>The Member ID for the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_private_messages"></span>
		<a href="#logged_in_private_messages"><code>{logged_in_private_messages}</code></a>
		</h3><p>The number of unread private messages for the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_screen_name"></span>
		<a href="#logged_in_screen_name"><code>{logged_in_screen_name}</code></a>
		</h3><p>The screen name for the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_total_comments"></span>
		<a href="#logged_in_total_comments"><code>{logged_in_total_comments}</code></a>
		</h3><p>The total number of comments posted by the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_total_entries"></span>
		<a href="#logged_in_total_entries"><code>{logged_in_total_entries}</code></a>
		</h3><p>The total number of entries posted by the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_total_forum_posts"></span>
		<a href="#logged_in_total_forum_posts"><code>{logged_in_total_forum_posts}</code></a>
		</h3><p>The total number of forum posts made by the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_total_forum_replies"></span>
		<a href="#logged_in_total_forum_replies"><code>{logged_in_total_forum_replies}</code></a>
		</h3><p>The total number of replies to forum posts by the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_total_forum_topics"></span>
		<a href="#logged_in_total_forum_topics"><code>{logged_in_total_forum_topics}</code></a>
		</h3><p>The total number of forum topics made by the currently logged-in user.</p>
		<h3>
		<span class="anchor" id="logged_in_username"></span>
		<a href="#logged_in_username"><code>{logged_in_username}</code></a>
		</h3><p>The username for the currently logged-in user.</p>

				<hr>

				<p class="docs-footer">
					<span>ExpressionEngine 5.4.2 Docs
					<br>
					<span class="copyright"><a href="https://packettide.com/">©2002–2021 Packet Tide,LLC.</a></span>
					</span>
					<a target="_blank" class="docs-contribute-to-page-button" href="https://github.com/ExpressionEngine/ExpressionEngine-User-Guide/blob/stability/docs/templates/globals/single-variables.md">Edit this page</a>
				</p>
			</div>
		</section>

		<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
		<script type="text/javascript">
			docsearch({
				apiKey: 'ba20cc61ab2d8a0148041c98eeddd9c6',
				indexName: 'expressionengine',
				inputSelector: '#docsearch-input',
				algoliaOptions: { 'facetFilters': ["version:v5"] },
				debug: false
			});
		</script>

		<script src="../../_assets/main.min.js"></script>
	</body>
</html>



