<!--
	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>Variable Modifiers — 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=""><a >Global Template Variables</a><ul><li  class=""><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 data-active-page="true" class="active"><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="variable-modifiers"></span>
		<a href="#variable-modifiers">Variable Modifiers</a>
		</h1><p>Most template variables can be modified for common formatting and output needs without requiring any plugins. For instance, making user-submitted content safe for use in a <code>&lt;meta&gt;</code> tag attribute, limiting to a certain number of characters, displaying currency, or as JSON to create structured data for SEO (search engine optimization). These modifiers apply to:</p><ul>
<li>All Channel Fields</li>
<li><a href="../templates/globals/url-segments.html">URL Segment Variables</a></li>
<li><a href="../templates/embedding.html#embedding-variables">Embed Variables</a></li>
<li><a href="../templates/layouts.html#layout-variables">Layout Variables</a></li>
<li><a href="../templates/routes.html">Template Route Variables</a></li>
<li><a href="../templates/globals/single-variables.html">Standard Global Variables</a></li>
<li>User-defined <a href="../templates/variable.html">Template Variables</a></li>
<li>All add-ons that use native APIs for parsing variables in templates</li>
</ul>
<p class="alert alert--warn"> <strong>Note:</strong> Some add-ons and components may have modifiers not listed here. For instance the <a href="../fieldtypes/file.html">File Fieldtype</a> has its own file information-related modifiers. The modifiers listed here are just those universally available.</p>
		<h2>
		<span class="anchor" id="modifiers"></span>
		<a href="#modifiers">Modifiers</a>
		</h2><div class="table-of-contents"><ul>
<li><a href="#attr_safe"><code>:attr_safe</code></a></li>
<li><a href="#censor"><code>:censor</code></a></li>
<li><a href="#currency"><code>:currency</code></a></li>
<li><a href="#decrypt"><code>:decrypt</code></a></li>
<li><a href="#encrypt"><code>:encrypt</code></a></li>
<li><a href="#form_prep"><code>:form_prep</code></a></li>
<li><a href="#json"><code>:json</code></a></li>
<li><a href="#length"><code>:length</code></a></li>
<li><a href="#limit"><code>:limit</code></a></li>
<li><a href="#number_format"><code>:number_format</code></a></li>
<li><a href="#ordinal"><code>:ordinal</code></a></li>
<li><a href="#raw_content"><code>:raw_content</code></a></li>
<li><a href="#replace"><code>:replace</code></a></li>
<li><a href="#rot13"><code>:rot13</code></a></li>
<li><a href="#spellout"><code>:spellout</code></a></li>
<li><a href="#url"><code>:url</code></a></li>
<li><a href="#url_decode"><code>:url_decode</code></a></li>
<li><a href="#url_encode"><code>:url_encode</code></a></li>
<li><a href="#url_slug"><code>:url_slug</code></a></li>
</ul>
</div>
		<h3>
		<span class="anchor" id="attr_safe"></span>
		<a href="#attr_safe"><code>:attr_safe</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>double_encode=</td>
<td><code>no</code></td>
<td>Whether or not to double encode already-encoded entities, e.g. should <code>&amp;quot;</code> become <code>&amp;amp;quot;</code>?</td>
</tr>
<tr>
<td>end_char=</td>
<td><code>&amp;#8230;</code></td>
<td>Character to append when a limit terminates the content</td>
</tr>
<tr>
<td>limit=</td>
<td></td>
<td>number of characters to limit to (retains whole words)</td>
</tr>
<tr>
<td>unicode_punctuation=</td>
<td><code>yes</code></td>
<td>Whether HTML entities for ’, ‘, ”, “, —, …, or non-breaking spaces should be decoded to the normal unicode characters.</td>
</tr>
</tbody></table></div><p>Makes content safe for use in an HTML attribute. It strips HTML tags, encodes special HTML characters, and can optionally limit the length of the content.</p><pre><code><span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"</span></span></span><span class="hljs-template-tag">{<span class="hljs-name">seo_descrip:attr_safe</span> <span class="hljs-attr">limit</span>=<span class="hljs-string">'150'</span>}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span>&gt;</span></span></code></pre>
		<h3>
		<span class="anchor" id="censor"></span>
		<a href="#censor"><code>:censor</code></a>
		</h3><p>Censor naughty words, using the site’s <a href="../control-panel/settings/word-censor.html">Word Censorship</a> settings.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">variable:censor</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- Some ####### content with naughty words censored --}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="currency"></span>
		<a href="#currency"><code>:currency</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>currency=</td>
<td><code>USD</code></td>
<td>International currency code</td>
</tr>
<tr>
<td>decimals=</td>
<td><code>standard for ICU locale</code></td>
<td>Decimal precision</td>
</tr>
<tr>
<td>locale=</td>
<td><code>en_US.UTF-8</code></td>
<td>The ICU locale ID</td>
</tr>
</tbody></table></div><p>Format a number as currency.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">cost:currency</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- $142.73 --}</span><span class="xml">

</span><span class="hljs-template-tag">{<span class="hljs-name">cost:currency</span> <span class="hljs-attr">currency</span>=<span class="hljs-string">'EUR'</span> <span class="hljs-attr">locale</span>=<span class="hljs-string">'de_DE'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- 142,73 € --}</span><span class="xml">

</span><span class="hljs-template-tag">{<span class="hljs-name">cost:currency</span> <span class="hljs-attr">decimals</span>=<span class="hljs-string">'0'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- $399,000 --}</span><span class="xml"></span></code></pre><p class="alert alert--warn"> <strong>Note:</strong> For non-US locale support, the PHP <code>intl</code> extension must be installed. Thankfully the PHP intl extension is available by default, so your environment would have had to intentionally disabled it (why??) for it to be unavailable.</p>
		<h3>
		<span class="anchor" id="decrypt"></span>
		<a href="#decrypt"><code>:decrypt</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>encode=</td>
<td><code>yes</code></td>
<td>Base64-decode the content (necessary for safe transport, e.g. submitted in a form)</td>
</tr>
<tr>
<td>key=</td>
<td></td>
<td>Custom encryption key to use. Allows you to potentially share encrypted data with another party without having to compromise your ExpressionEngine installation’s primary encryption key.</td>
</tr>
</tbody></table></div><p>Decrypt the content.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">secret:decrypt</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- No more secrets --}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="encrypt"></span>
		<a href="#encrypt"><code>:encrypt</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>encode=</td>
<td><code>yes</code></td>
<td>Base64-decode the content (necessary for safe transport, e.g. submitted in a form)</td>
</tr>
<tr>
<td>key=</td>
<td></td>
<td>Custom encryption key to use. Allows you to potentially share encrypted data with another party without having to compromise your ExpressionEngine installation’s primary encryption key.</td>
</tr>
</tbody></table></div><p>Encrypt the content.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">secret:encrypt</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- H8JwSqsqVYUCvYBUmKqaXjO4VzLsyj791dtim3EfJT8= --}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="form_prep"></span>
		<a href="#form_prep"><code>:form_prep</code></a>
		</h3><p>Make the content safe to use as the value of a form field.</p><pre><code><span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"myField"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"{excerpt:form_prep}"</span>&gt;</span>
{!-- <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"myField"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"A &amp;lt;em&amp;gt;brief&amp;lt;/em&amp;gt; discussion about &amp;quot;Wonko the Sane&amp;quot;"</span>&gt;</span> --}</code></pre>
		<h3>
		<span class="anchor" id="json"></span>
		<a href="#json"><code>:json</code></a>
		</h3><p>Encode the content for JSON output.</p><pre><code><span class="hljs-string">"headline"</span>: {title:json},
// <span class="hljs-string">"headline"</span>: <span class="hljs-string">"Greatest Crash in Wall Street\u2019s History"</span>,</code></pre>
		<h3>
		<span class="anchor" id="length"></span>
		<a href="#length"><code>:length</code></a>
		</h3><p>Outputs the length of the content in characters.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">excerpt:length</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- 217 --}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="limit"></span>
		<a href="#limit"><code>:limit</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>characters=</td>
<td><code>500</code></td>
<td>Number of characters to limit to</td>
</tr>
<tr>
<td>end_char=</td>
<td><code>&amp;#8230;</code></td>
<td>character to append when a limit terminates the content</td>
</tr>
</tbody></table></div><p>Limits the content to the specified number of characters. May be fewer than the exact limit, as this retains whole words.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">excerpt:limit</span> <span class="hljs-attr">characters</span>=<span class="hljs-string">'20'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- A discussion&amp;#8230; --}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="number_format"></span>
		<a href="#number_format"><code>:number_format</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>decimals=</td>
<td><code>0</code></td>
<td>Number of decimal precision</td>
</tr>
<tr>
<td>decimal_point=</td>
<td><code>.</code></td>
<td>character to use as the decimal point</td>
</tr>
<tr>
<td>thousands_separator=</td>
<td><code>,</code></td>
<td>character to use as the thousands separator</td>
</tr>
</tbody></table></div><p>Formats a number using typical options.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">volume:number_format</span> <span class="hljs-attr">decimals</span>=<span class="hljs-string">'2'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- 1,234.56 --}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="ordinal"></span>
		<a href="#ordinal"><code>:ordinal</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>locale=</td>
<td><code>en_US.UTF-8</code></td>
<td>The ICU locale ID</td>
</tr>
</tbody></table></div><p>Formats a number with its ordinal suffix.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">rank:ordinal</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- 42nd --}</span><span class="xml">

</span><span class="hljs-template-tag">{<span class="hljs-name">rank:ordinal</span> <span class="hljs-attr">locale</span>=<span class="hljs-string">'es_ES'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- 42.º --}</span><span class="xml"></span></code></pre><p class="alert alert--warn"> <strong>Note:</strong> For non-US locale support, the PHP <code>intl</code> extension must be installed. Thankfully the PHP intl extension is available by default, so your environment would have had to intentionally disabled it (why??) for it to be unavailable.</p>
		<h3>
		<span class="anchor" id="raw_content"></span>
		<a href="#raw_content"><code>:raw_content</code></a>
		</h3><p>Output the raw, unparsed content of the variable, for example as stored in the database with no typography variable interpolation. Useful for creating content export templates.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">checkbox:raw_content</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- IL|OR|HI --}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="replace"></span>
		<a href="#replace"><code>:replace</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>case_sensitive=</td>
<td><code>yes</code></td>
<td>Whether the Find pattern is treated as case-sensitive. Has no impact if the <code>regex=</code> parameter is used, since the regex pattern will define case-sensitivity.</td>
</tr>
<tr>
<td>find=</td>
<td></td>
<td>The text to search for</td>
</tr>
<tr>
<td>regex=</td>
<td><code>no</code></td>
<td>Whether the Find pattern should be handled as a regular expression</td>
</tr>
<tr>
<td>replace=</td>
<td></td>
<td>The text to replace the Find pattern with</td>
</tr>
</tbody></table></div><p>Replace text within the content.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">content:replace</span> <span class="hljs-attr">find</span>=<span class="hljs-string">'vegetables'</span> <span class="hljs-attr">replace</span>=<span class="hljs-string">'pizza'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- You should eat pizza every day. --}</span><span class="xml">

</span><span class="hljs-template-tag">{<span class="hljs-name">full_name:replace</span> <span class="hljs-attr">find</span>=<span class="hljs-string">'/(.*?),\s*(.*)/'</span> <span class="hljs-attr">replace</span>=<span class="hljs-string">'$2 $1'</span> <span class="hljs-attr">regex</span>=<span class="hljs-string">'yes'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- John Doe (presuming {full_name} is "Doe, John") --}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="rot13"></span>
		<a href="#rot13"><code>:rot13</code></a>
		</h3><p>Perform a ROT13 substitution cypher to the content.</p><pre><code><span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"spoiler"</span> <span class="hljs-attr">data-secret</span>=<span class="hljs-string">"{spoiler:attr_safe}"</span>&gt;</span>{content:rot13}<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
{!-- <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"spoiler"</span> <span class="hljs-attr">data-secret</span>=<span class="hljs-string">"He was dead the whole time!"</span>&gt;</span>Ur jnf qrnq gur jubyr gvzr!<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span> --}</code></pre>
		<h3>
		<span class="anchor" id="spellout"></span>
		<a href="#spellout"><code>:spellout</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>capitalize=</td>
<td><code>none</code></td>
<td>One of <code>ucfirst</code> (uppercase first letter) or <code>ucwords</code> (uppercase first letter of each word)</td>
</tr>
<tr>
<td>locale=</td>
<td><code>en_US.UTF-8</code></td>
<td>The ICU locale ID</td>
</tr>
</tbody></table></div><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">rank:spellout</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- forty-two --}</span><span class="xml">

</span><span class="hljs-template-tag">{<span class="hljs-name">rank:spellout</span> <span class="hljs-attr">capitalize</span>=<span class="hljs-string">'ucfirst'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- Forty-two --}</span><span class="xml">

</span><span class="hljs-template-tag">{<span class="hljs-name">rank:spellout</span> <span class="hljs-attr">locale</span>=<span class="hljs-string">'de_DE'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- zwei­und­vierzig --}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="url"></span>
		<a href="#url"><code>:url</code></a>
		</h3><p>Normalize a URL to use in markup. Primarily to make sure it contains a valid protocol. For instance if <code>{website}</code> was <code>www.example.com</code>:</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">website:url</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- http://www.example.com/ --}</span><span class="xml"></span></code></pre><p>Note that it is best to use a <a href="../fieldtypes/url.html">URL</a> field, so this is more useful for values coming from plugins or outside sources.</p>
		<h3>
		<span class="anchor" id="url_decode"></span>
		<a href="#url_decode"><code>:url_decode</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>plus_encoded_spaces=</td>
<td><code>no</code></td>
<td>whether or not to encode spaces as <code>+</code> instead of <code>%20</code></td>
</tr>
</tbody></table></div><p>URL decode the contents.</p><pre><code><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Location: {segment_2:url_decode}<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
{!-- <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Location: New Zealand<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span> --}</code></pre>
		<h3>
		<span class="anchor" id="url_encode"></span>
		<a href="#url_encode"><code>:url_encode</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>plus_encoded_spaces=</td>
<td><code>no</code></td>
<td>whether or not to encode spaces as <code>+</code> instead of <code>%20</code></td>
</tr>
</tbody></table></div><p>URL encode the contents.</p><pre><code><span class="xml"><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">path</span>=<span class="hljs-string">'view/{location:url_encode}'</span>}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span>&gt;</span></span><span class="hljs-template-tag">{<span class="hljs-name">location</span>}</span><span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
</span><span class="hljs-comment">{!-- &lt;a href="https://example.com/view/New%20Zealand}"&gt;New Zealand&lt;/a&gt; --}</span><span class="xml"></span></code></pre>
		<h3>
		<span class="anchor" id="url_slug"></span>
		<a href="#url_slug"><code>:url_slug</code></a>
		</h3><div class="table-wrapper"><table><thead><tr>
<th>Parameter</th>
<th>Default</th>
<th></th>
</tr>
</thead><tbody><tr>
<td>lowercase=</td>
<td><code>yes</code></td>
<td>Whether to force a lowercase URL slug</td>
</tr>
<tr>
<td>remove_stopwords=</td>
<td><code>no</code></td>
<td>Whether to remove common words (obeys site configuration <code>system/user/config/stopwords.php</code>)</td>
</tr>
<tr>
<td>separator=</td>
<td><code>global-channel-word-seperator-label</code> (typically a dash)</td>
<td>The character to use as a word separator</td>
</tr>
</tbody></table></div><p>Create a URL slug from the content.</p><pre><code><span class="xml"></span><span class="hljs-template-tag">{<span class="hljs-name">excerpt:url_slug</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- a-phrase-with-words-from-the-stopwords-list --}</span><span class="xml">

</span><span class="hljs-template-tag">{<span class="hljs-name">excerpt:url_slug</span> <span class="hljs-attr">remove_stopwords</span>=<span class="hljs-string">'yes'</span>}</span><span class="xml">
</span><span class="hljs-comment">{!-- phrase-words-stopwords-list --}</span><span class="xml"></span></code></pre>

				<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/variable-modifiers.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>



