Page

Page

Every page on the site is created by processing templates using specific pre-defined inputs. While much information may be loaded dynamically by tags in the template, there are certain objects that are present on every pageload:

{{ request }}

The request object is available on every page, and contains information regarding the HTTP request that may be useful for serving and rendering the page.

Name Type Description
is_valid Boolean True if the request is for a Marketpath CMS Page. False if it is a 404 page.
domain String The requested domain name
method String The lowercase HTTP method of the current request (eg: "get" or "post")
use_ssl Boolean True if the request used the "https" scheme
path String The part of the URL after the domain, including the leading '/' but not including the query string parameters or hash.
query_string String Everything after the '?' character in the URL
query_params query_params Object containing all of the query string parameters for the current page
post_params post_params Object containing all of the HTTP posted parameters for the current request
url String The full URL of the current request - including the scheme, the domain, the path, and the query string
is_preview Boolean True if the request is being served from the preview environment
date time The full date that the server began processing the request. Using this property prevents the page from being fast-cached, so it is preferable to use the other date-related properties on the request if possible
year Integer The year that the server began processing the request
month Integer The month of the year that the server began processing the request (1 through 12)
day Integer The day of the month that the server began processing the request (1 through 31)
hour Integer The hour that the server began processing the request (0 through 23)
timezone String The name of the current timezone used to display dates (eg: PST or PDT)
timezone_full String The full name of the timezone used to display dates (eg: "America/Indianapolis")
user_agent String The User Agent supplied by the current request
searchterm String Only set if the {% search %} method was used and will contain the searchterm used by the {% search %} method
is_suspected_bot Boolean Will be true if the current request is suspected to be by a bot. Note that this uses a simple method of checking the user agent which is easy for bots to fake, so this should not be used as a definitive test
headers headers Object containing all of the headers sent with the current request
cookies cookies Object containing all of the cookies for the current request. Note that this is a "live" object that may be modified by the {% set_cookie %} and {% unset_cookie %} methods

{{ entity }}

Field containing a reference to an entity. The properties of the specific entity depends on the type of entity and other factors.

Name Type Description
object_type String Will always be datastore_item
is_valid Boolean True if this references a published entity
guid String The unique identifier for this entity
value String Contains the same value as guid
name text The name of the entity
title text The title of the entity
linked_title String A link to the entity if it has a URL, or the escaped title if not
has_url Boolean True if the entity has a URL
include_in_search Boolean Whether or not this entity should be returned in on-site search results
domain_name text The domain name used by the URL for this entity
url text The portion of the URL for this entity following the domain name
full_url String The full URL for this entity including the scheme, domain name, and path
visited Boolean Whether or not the user has visited this URL previously in their current session. Note that this will always be false if the user has not allowed session permission (see the Permissions and Personalization documentation). Using this property prevents the page from being fast-cached
template_guid String The unique identifier for the template that would be used to respond to this URL
template template The template that would be used to respond to this URL
canonical_url url The canonical URL if this is not the original source of content for this URL
browser_title text The browser title to use for this URL
meta_description textarea The meta description for this URL
meta_robots text The meta robots for this URL
keywords textarea The SEO keywords for this URL
search_entity_guid String The unique identifier for the entity that search results should be directed to (if this entity does not have a URL)
search_entity entity The entity that search results should be directed to (if this entity does not have a URL)
folder_guid String The unique identifier for the folder that contains this entity.
folder folder The folder that contains this entity.
field_id String The identifier for this field
label String The label for this field
output String The default output that the entity would produce if it were output directly to the template. The default output may change at any time. Template developers should avoid using this and should handle the output of different entity types themselves
data data Object containing the custom fields on this entity
* String Specific custom fields may be accessed using {{ entity.fieldid }} or {{entity['field-id']}}

{{ automatic_markup }}

The automatic_markup object contains information about the data and markup that will be added to the page automatically after it is rendered by the template.

Name Type Description
is_valid Boolean Will always be true
title String The page title as it is currently configured to be output as part of the automatic markup. Defaults to {{ entity.browser_title }} but may be set to another value using {% set_title %}
description String The page meta description as it is currently configured to be output as part of the automatic markup. Defaults to {{ entity.meta_description | default:site.default_meta_description }} but may be set to another value using {% set_description %}
robots String The page robots meta information as it is currently configured to be output as part of the automatic markup. Defaults to {{ entity.meta_robots }} but may be set to another value using {% set_robots %}
canonical_url String The page's canonical url meta information as it is currently configured to be output as part of the automatic markup. Defaults to {{ entity.canonical_url }} but may be set to another value using {% set_canonical_url %}
favicon String The favicon for the pae as it is currently configured to be output as part of the automatic markup. Does NOT have a default value but may be set using {% set_favicon %}
head_enabled Boolean True if the template is currently configured to output automatic markup in the head of the current page. Defaults to true but may be changed using {% toggle_automatic_markup %}
body_enabled Boolean True if the template is currently configured to output automatic markup in the body of the current page. Defaults to true but may be changed using {% toggle_automatic_markup %}
show_preview_code Boolean True if the template is currently configured to output extra markup (HTML and javscript) as a result of being loaded through the preview UI in Marketpath CMS
show_edit_link Boolean True if the template is currently configured to output the "Edit Page" link to the current page. Note that this depends on a number of factors, the most notable of which are the site configuration and the user being logged in to Marketpath CMS at the same time. Can be changed using {% toggle_automatic_markup %}, but only if the pre-requisites for showing the edit link have been met
powered_by_required Boolean True if the current plan requires the "Powered by Marketpath CMS" notice to be displayed
powered_by_output Boolean True if the "Powered by Marketpath CMS" notice has already been output to the template using the {% powered_by %} method
header_markup String The markup that will be output to the head of the current page. Equivalent to "{{ header_start_markup }}{{ header_end_markup }}"
header_start_markup String The markup that will be output to the beginning of the head of the current page. This includes the browser title and other meta information
header_end_markup String The markup that will be output to the end of the head of the current page. This includes the stylesheets and javascript that were added to the header using {% add_stylesheet %} and {% add_javascript %}
body_markup String The markup that will be output to the end of the body of the current page. This includes the stylesheets and javascript that were added to the body using {% add_stylesheet position:body %} and {% add_javascript position:body %}
header_scripts list The list of javascript linked_src objects that should be output to the document head as part of the automatic markup
body_scripts list The list of javascript linked_src objects that should be output to the document body as part of the automatic markup
stylesheets list The list of stylesheet linked_src objects that should be output to the document head as part of the automatic markup
body_stylesheets list The list of stylesheet linked_src objects that should be output to the document body as part of the automatic markup (most styles should be added to the head and not the body except in rare edge-cases)
output String Deprecated. Contains a long pseudo-random string.

{{ page_view }}

An object containing information about a previous request in the current session

Name Type Description
is_valid Boolean True if the value is not empty
url String The full request url - including the scheme (http/https), the domain, the path, the query string, and the hash
guid String The unique identifier for the requested page, or empty if no page was found (ie: a 404 request)
browser_title String The browser title of the requested page
title String The title of the entity on the requested page - if a page was found
date time The request date (in UTC)
code Integer The response code. Some common response codes are 200 "OK", 404 "Not Found", and 500 "Internal Error"

An object containing information about a previous request in the current session

{{ error_page }}

Name Type Description
object_type String Will always be datastore_item
is_valid Boolean True if this references a published error_page
guid String The unique identifier for this error_page
value String Synonymn for guid
name text The name of the error_page
title text The title of the error_page
linked_title String A link to the error_page if it has a URL, or the escaped title if not
error_code select HTTP status code handled by this error page (e.g., 404, 500)
url_filter text The URL filter used to limit which URLs this error page may be shown for (ie: to display different error pages for different sections of the site)
content_html html The primary HTML content for the error page
has_url Boolean True if the error_page has a URL
include_in_search Boolean Whether or not this error_page should be returned in on-site search results
domain_name text The domain name used by the URL for this error_page
url text The portion of the URL for this error_page following the domain name
full_url String The full URL for this error_page including the scheme, domain name, and path
visited Boolean Whether or not the user has visited this URL previously in their current session. Note that this will always be false if the user has not allowed session permission (see the Permissions and Personalization documentation). Using this property prevents the page from being fast-cached
template_guid String The unique identifier for the template that would be used to respond to this URL
template template The template that would be used to respond to this URL
canonical_url url The canonical URL if this is not the original source of content for this URL
browser_title text The browser title to use for this URL
meta_description textarea The meta description for this URL
meta_robots text The meta robots for this URL
keywords textarea The SEO keywords for this URL
search_entity_guid String The unique identifier for the entity that search results should be directed to (if this error_page does not have a URL)
search_entity entity The entity that search results should be directed to (if this error_page does not have a URL)
folder_guid String The unique identifier for the folder that contains this error_page.
folder folder The folder that contains this error_page.
field_id String The identifier for this field
label String The label for this field
output String The default output that the error_page produces when output directly to the template. The default output may change at any time. Template developers should avoid using this and should handle the output of error pages themselves
data data Object containing the custom fields on this error_page
* String Specific custom fields may be accessed using {{ entity.fieldid }} or {{error_page['field-id']}}

{{ error_pages }}

Contains multiple error_pages.

Name Type Description
output String The default output that the error_pages will produce when it is output directly to the template - using the "output_in_list" property of each error_page in the items list

{{ page_view }}

The page_view object contains information about a single HTTP request and response in the current session.

Name Type Description
is_valid Boolean Will always be true
url String The requested URL including the scheme, host, and path, but not including the query string
guid String If the request was for a Marketpath CMS entity, page_view.guid will be the unique identifier for the corresponding entity
browser_title String If the request was for a Marketpath CMS entity, page_view.browser_title will be the browser title for the corresponding entity (whether or not the template modified the browser title before the page was output)
title String If the request was for a Marketpath CMS entity, page_view.title will be the title for the corresponding entity
date time The date and time that the server started processing the request
code Integer The HTTP status code served with the response

{{ client }}

The client object is available on every page, and contains information about the history of the browser used to access the site. Note that most of these properties are only meaningful if the user has allowed permission for sessions.

Additionally, client properties require cookies in order to work. Requests made without cookies (such as by bots or browsers with cookies disabled) or without permission for session will always behave like an initial page-load without existing client information.

The client object is one of a handful of simple mechanisms to enable personalization on your site. Used well, these can be powerful tools for developers and website owners.

Name Type Description
is_valid Boolean Whether or not the user (or developer) has granted permission for a session
allowed Boolean Whether or not the user (or developer) has granted permission for a session
id String The unique identifier for the client browser. If the user does not have permission for a session this will be empty
user_agent String The user-agent string sent with the request. This is an alias of request.user_agent
permissions client_permissions The permissions that are set for the current client. The shortcut for this is {{ client_permissions }}
session session The current session for the client. The shortcut for this is simply {{ session }}
cookies cookies The cookies for the current client. This is an alias of {{ request.cookies }} and the shortcut for this is {{ cookies }}
first_request_date time The date that we received the first request from this client. Note that this is dependent on a number of outside factors, including the client's use (and/or clearing) of cookies and their allowance of sessions
num_requests Integer The total number of requests made by this client since the first_request_date
num_pages Integer The total number of successful page requests made by this client since the first_request_date
num_sessions Integer The total number of sessions created for this client since the first_request_date
properties list The full list of custom properties that are set for the current client. Note that this list only includes the keys, the values will have to be retrieved using the keys
max_properties Integer The maximum number of properties that may be stored on the client object. Adding new properties beyond that limit will result in the oldest properties being replaced by the newer properties. The default limit to the number of properties is currently 100. If you need more than 100 client properties contact Marketpath about raising your limit
* String Individual custom properties for the client may be accessed using {{ client.propertyName }} or {{ client['property-name'] }} syntax
output String JSON representation of the client object, similar to {{ client | inspect: 4, false }}

The client object is copyable, and when copied using the {% copy_to_dictionary %} method, the keys will be the custom property names and the values will be the corresponding custom property values.

The client object may also be enumerated as a list of strings, which will be the names of the custom properties saved on the client. Note that this list will only include the property names when the enumeration started and adding or removing client properties during enumeration will not affect the property names for the current enumeration.

{{ client_permissions }}

The client_permissions object is available on every page, and contains information about whether or not the user (or developer) has granted permission to use specific features. By default the only feature controlled by this is sessions, but the permission system may be "extended" arbitrarily by the developer to control additional features.

The permissions feature requires cookies in order to work. Requests made without cookies (such as by bots or browsers with cookies disabled) will always behave like an initial page-load without existing permission information.

Name Type Description
is_valid Boolean Will always be true
cookiename String The name of the cookie used for storing permissions. Will always be "_mp_permissions"
has_cookie Boolean True if the permissions cookie was already set prior to this request. False on the first page load, after the client has cleared their cookies, or on all requests from browsers with cookies disabled
cookie_expires time The date and time that the permissions cookie is set to expire
min_permission_expiration_date time The next date and time that one of the permissions is set to expire. Note that this does not distinguish between "allow" and "deny" permissions and will ignore permissions with no expiration date set. If there are no permissions with expiration dates set this property will be empty
max_permission_expiration_date time The latest date and time that one of the permissions is set to expire. Note that this does not distinguish between "allow" and "deny" permissions and will ignore permissions with no expiration date set. If there are no permissions with expiration dates set this property will be empty
do_not_track Boolean Whether or not the browser sent the "DNT" header in the request
keys list The list of permissions (both allowed and denied) stored in the client_permissions object
* permission Specific permissions may be accessed using {{ client_permissions.permissionname }} or {{ client_permissions['permission-name'] }}
allow_* Boolean Shortcut to check if a specified permission is both defined AND allowed in the permission system.
output String JSON representation of the client_permissions object, similar to calling {{ client_permissions | inspect: 3, false }}

The client_permissions object is copyable, and when copied using the {% copy_to_dictionary %} method the keys will be the permission names and the values will be the corresponding permission objects.

The client_permissions object may also be enumerated using the {% for %} method, which will loop through all of the related permission objects when the for loop is started. Permissions that are added during enumeration will NOT be included, permissions that are removed during enumeration WILL be included, and permission s that are modified during enumeration will be included along with their updated properties.

{{ permission }}

An object containing information about permission allowed or denied in the permissions system and accessed using the {{ client_permissions }} object.

Name Type Description
is_valid Boolean Will always be true
value String The value stored with the permission. May be empty
name String The name of the permission (eg: "session", or any custom value set by the developer)
allowed Boolean True if the permission is set to "allow". False if the permission is set to "deny"
expires time The date that the permission (either allowed or denied) is set to expire

{{ cookies }}

The cookies object is available on every page, and contains information regarding the cookies sent with the request. Note that this will typically only include cookies for the current or top-level domain on multi-domain sites.

Name Type Description
is_valid Boolean Will always be true
keys list The list of cookie names on the current request, including cookies that may have been added or removed after the request started processing.
* String Individual cookies on this request may be accessed using {{ cookies.cookieName }} or {{ cookies['cookie-name'] }} syntax
output String JSON representation of the cookies object, similar to {{ cookies | inspect: 3, false }}

The cookies object is copyable, and when copied using the {% copy_to_dictionary %} the keys will be the names of the cookies and the values will be the corresponding cookie objects.

You may also treat this object as a list containing all of the cookie names which may be iterated using a {% for %} loop.

{{ session }}

The session object is available on every page, and contains information about the user's current session. Note that most of these properties are only meaningful if the user has allowed permission for sessions.

Additionally, sessions require cookies in order to work. Requests made without cookies (such as by bots or browsers with cookies disabled) or without permission for sessions will always behave like an initial page-load without existing session information.

The session object is one of a handful of simple mechanisms to enable personalization on your site. Used well, these can be powerful tools for developers and website owners.

Name Type Description
is_valid Boolean Whether or not the user (or template developer) has granted permission for a session
allowed Boolean Whether or not the user (or template developer) has granted permission for a session
id String The unique identifier for the user's session. This will contain a value even if the user is not allowed to have a session, but the value will change on every page load
first_page Boolean True if this is the first page load in the user's current session. Note that this will always return true if the user does not have permission for a session since we will have no "memory" of prior page loads for the current session
start_date time The time that the current session started (equivalent to the time that the first request was made for this session)
end_date time The time that the current session will expire if no more requests are made. Note that sessions are extended by every request and so the end_date will also be different on every request
num_requests Integer The total number of requests for the current session, including requests resulting in errors
num_pages Integer The total number of successful page requests for the current session. This is different than num_requests in that it does not include any requests which resulted in an HTTP response code other than 200. This also assumes that the current request will return a 200 response code
unique_pages Integer The total number of unique pages requested in the current session. This number could be significantly lower than num_pages if the user requests several pages multiple times
num_errors Integer The total number of errors returned in the current session. This includes any request that returns something other than a 200 response code
properties list The full list of custom properties that have been set for the current session. Note that this list only includes the keys, the values will have to be retrieved using the keys
history list A list containing the last 100 page views as page_view objects for the current session
* String Individual custom properties for the session may be accessed using {{ session.propertyName }} or {{ session['property-name'] }} syntax
output String JSON representation of the session object, similar to calling {{ session | inspect: 3, false }}

The session object is copyable, and when copied using the {% copy_to_dictionary %} method the keys will be the custom session property names and the values will be the corresponding custom property values.

You may also treat this object as a list containing all of the property names which may be iterated using a {% for %} loop.

{{ auth }}

Stores information about the current state of profile authorization, which is the result of calls to the {% auth %} methods.

Name Type Description
is_valid Boolean Will be true if an {% auth init %} method has been called
init Boolean Will be true if an {% auth init %} method has been called
id String The identifier used by the {% auth init %} method
exists Boolean Will be true if the profile referenced by the {% auth init %} method has been created
profile The profile that auth commands are currently being executed for. Note that this profile may or may not have been created yet
error_code String A short error code that can be used to identify the type of error caused by the last call to a {% auth %} method.
error_message String A longer description containing details about the error caused by the last call to a {% auth %} method.
logged_in Boolean Whether or not the user is currently logged in to a profile (identified by the global {{ profile }} variable)
login_success Boolean Will be true if the {% auth login %} method was called and was successful
aborted Boolean Will be true if the {% auth abort %} method was called
can_abort Boolean Will be true if it is possible to use the {% auth abort %} method
password_changed Boolean Will be true if an auth method was used to set or change a profile's password
id_changed Boolean Will be true if an auth method was used to set or change a profile's id
old_id String If auth methods were used to change the id of a profile, old_id will contain the original id before it was changed
new_id String If auth methods were used to change the id of a profile, new_id will contain the final id after it was changed
email_changed Boolean Will be true if an auth method was used to set or change a profile's email address
old_email String If auth methods were used to change the email address of a profile, old_email will contain the original email address before it was changed
new_email String If auth methods were used to change the email address of a profile, new_email will contain the final email address after it was changed
force_password_reset Boolean Will be true if {% auth force_password_reset %} was called successfully or if {% auth register %} was called successfully and the password must be reset on the new profile
activation_code_set Boolean Will be true if {% auth set_activation_code %} was called successfully or if {% auth register %} was called successfully and the new profile requires activation
new_activation_code String If {% auth set_activation_code %} was called successfully or if {% auth register %} was called successfully and the new profile requires activation, new_activation_code will contain the activation code that should be used to activate the new profile
activation_code_expires time If {% auth set_activation_code %} was called successfully or if {% auth register %} was called successfully and the new profile requires activation, activation_code_expires will contain the date and time that the new activation code will expire
activated Boolean Will be true if {% auth activate %} was called successfully or if {% auth register %} was called successfully and the new profile is already activated
deactivated Boolean Will be true if {% auth deactivate %} or {% auth set_activation_code %} (which also automatically deactivates the profile) was called successfully
locked Boolean Will be true if {% auth lock %} was called successfully
unlocked Boolean Will be true if {% auth unlock %} was called successfully
locked_until time If {% auth lock %} was called successfully, locked_until will contain the date and time that the profile will no longer be locked
blocked Boolean Will be true if {% auth block %} was called successfully
unblocked Boolean Will be true if {% auth unblock %} was called successfully
registered Boolean Will be true if {% auth register %} was called successfully
output String A json representation of the current auth object

{{ profile }}

Name Type Description
object_type String Will always be datastore_item
is_valid Boolean True if this references a published profile
guid String The unique identifier for this profile
value String Contains the same value as guid
id String The identifier for the profile. May or may not be the same as email, depending on the site settings
email String Email address for this profile
force_password_reset Boolean If true, the user must reset their password at next login
is_active Boolean If true, the profile is active and can be used. If false, the profile must be activated before it may be used
date_activated time The date that this profile was activated
date_activation_code_expires time The date when the activation code will expire and no longer be valid
date_first_activated time The date of the first successful activation for this profile
is_locked Boolean If true, this profile is temporarily locked and may not be used to sign in until it is unlocked
date_locked_through time If this profile is locked, this will be set to the date that the profile will be automatically unlocked
date_last_logged_in time The date that this profile was last used to sign in to the website
is_blocked Boolean If true, this profile has been permanently blocked and may not be used to sign in
date_blocked time If this profile is blocked, this will be set to the date when the profile was blocked
attributes dictionary The custom attributes for this profile. Attributes may either be manually set in the Marketpath CMS UI or programmatically set from template markup
logged_in Boolean True if this profile is presently logged in on the current request
can_login Boolean True if the profile exists, is active, and is not blocked or locked
settings object An object containing all of the custom profile settings for this profile
field_id String The identifier for this field
label String The label for this field
output String The default output that the profile produces when output directly to the template. Currently simply outputs the email, but the default output may change at any time. Template developers should avoid using this and should handle the output of profiles themselves

{{ profiles }}

Contains multiple profiles.

Name Type Description
output String The default output that the profiles will produce when it is output directly to the template - using the "output_in_list" property of each profile in the items list

Root Scope Reserved Variables

Every page on the site is created by processing templates using specific pre-defined inputs. These reserved variables are present on the root scope of every pageload.

Name Type Description
site site An object containing information about the current site - including the custom site settings
request request An object containing information about the current request
client client An object containing information about the current "client" - such as the "UserAgent", the first request date, the number of client sessions and pages visited, custom client properties, and more
cookies cookies An object containing all of the cookies from the current request (can also be accessed via the client or request objects)
client_permissions client_permissions An object containing the permissions that are set for the current client. Can also be accessed via the client object
session session An object containing information about the current "session", including the session start date, when it will expire if the user does not make any further requests, how many and which pages they have visted, custom client properties, and more.
automatic_markup automatic_markup An object containing information about the currently-configured behavior of the automatic page markup
header_tags object Deprecated. A placeholder primarily used to inject information into the document header - such as the browser title, meta information, and any stylesheets or javascript added using the {% add_stylesheet %} and {% add_javascript %} tags. Use of this object is entirely optional - if not included in the template then this information will automatically be output directly before the </head> tag in your HTML output
body_tags object Deprecated. A placeholder used to inject all of the javascript added to the body using {% add_javascript position:'body' %}. This is also a placeholder for the script that enables the "Edit Page" button to be displayed on your live site when you are logged into Marketpath CMS and viewing your site via https. Use of this object is entirely optional - if not included in the template then this information will automatically be output directly before the </body> tag in your HTML output.
auth auth An object containing the results of any authentication methods that have been run. Initially, the only relevent information in this object is {{ auth.logged_in }}, although additional information may be stored on this object after calling various other {% auth %} methods
entity entity An object containing information about the entity attached to this page. The entity object loaded on the page will be the specific entity type the page was created with (ie: Article, Blog, Blog Post, etc...). See the list of possible Entity Type objects in the menu on the left
mp_editor_preview Boolean Will be true if viewing the page as an administrator in the edit page preview UI. Otherwise will remain undefined
profile profile If the user is currently logged in as a profile, this will reference an object containing information about the profile that they are logged in as
error_code Integer Only applies to error pages, in which case this will be the HTTP error code to be returned with the response
error_message String Only applies to error pages, in which case this will be the error message for the most immediate error that caused the error page to be needed
inner_exception String Only applies to error pages that were required in order to handle an error that occurred while processing another error page, in which case this will be the error message for the original error that caused the first error page to be needed

{% toggle_automatic_markup %}

Enables or disables the automatic markup at the page level

Automatic markup typically only applies to HTML pages. You cannot enable the "Edit Page" button if it would not be displayed on the site by default (ie: either if it has been disabled in the site settings, if it is being viewed from the preview site, or if the current user is not signed in to Marketpath CMS.

{% set_title %}

Sets the page title.

The current title is available at {{ automatic_markup.title }}

{% set_description %}

Sets the meta description for the current page, which is output by default as part of an HTML page's {{ automatic_markup }}.

The current meta description is available at {{ automatic_markup.description }}

{% set_canonical_url %}

Sets the canonical URL for the current page, which is output by default as part of an HTML page's {{ automatic_markup }}.

The current canonical URL is available at {{ automatic_markup.canonical_url }}

{% set_robots %}

Sets the robots meta directive.

The current robots meta directive is available at {{ automatic_markup.robots }}

{% set_favicon %}

Sets the URL to the favicon for the current page, which is output by default as part of an HTML page's {{ automatic_markup }}.

This simply changes the URL for the favicon meta tag in the head of the HTML response. It does not take into consideration alternate meta tags and it does not change the response to requests for "/favicon.ico".

The current favicon URL is available at {{ automatic_markup.favicon }}

Examples

Set favicon from string

Copy
{% set_favicon "https://domain.com/path/to/image.ico" %} or {% var favicon = "https://domain.com/path/to/image.ico" %} {% set_favicon favicon %}

Set favicon from image

Copy
{% set_favicon "favicon" %} or {% image img = "favicon" %} {% set_favicon img %}

{% set_timezone %}

Sets the default timezone to use when rendering dates and times on the page that do not already have a separate timezone configured.

Some dates and times do not use the default timezone and will not be affected by this method.

Examples

Set Timezone by String

Copy
{% set_timezone "America/Indianapolis" %}

Set Timezone with string manipulation

Copy
{% var cityname = "Amsterdam" %} {% set_timezone "Europe/" | append: cityname %}