automatic_markup

automatic_markup

The automatic_markup object is available on every page, and contains information about additional configuration options, scripts, and styles to be included on the page.

{{ 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.

Properties of {{ automatic_markup }} objects
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 page 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 javascript) 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.

Related

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.

object

May be any object, including simple, complex and list objects. In some cases may even include symbols and null.

{{ form }}

{{ toggle }}

{{ code }}

{{ html }}

string

Can be any text, from the empty string ("") to the full HTML output of the template. When used alone in a conditional, all strings evaluates as true - even if they are empty or a value such as "0" or "false".

{{ linked_src }}

{{ stylesheets }}

Contains multiple stylesheets.

{{ document }}

{{ stylesheet }}

{{ entity }}

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

{{ template }}

number

Can be any number, including integers, decimals, or the value 0. Any value - including 0 - evaluates as true when used alone in a conditional.

{{ url }}

Field containing a URL.

{% toggle_automatic_markup %}

Enables or disables the automatic markup at the page level

{{ time }}

Represents a specific instant in a specific timezone.

{{ site }}

The site object is available on every page, and contains information about the current site. This information is the same on every page for the site.

{{ javascript }}

list

An enumerable list containing zero or more objects. Lists may contain many different object types, although most lists only contain a single object type. There are a large number of other complex object types that are also lists (ag: an articlelist is a complex object but is also a list of article objects).

{% toggle_automatic_markup %}

Enables or disables the automatic markup at the page level

{% toggle_automatic_markup flags %}

{% toggle_automatic_markup
flags
 
One or more values. May use the variable arguments syntax. Options that control which markup is enabled or disabled
%}

flags

enable
 
Turns the automatic markup on for the specified options
disable
 
Turns the automatic markup off for the specified options (default)
header
 
Turns the header markup on or off
body
 
Turns the body markup on or off
edit_page
 
Turns the "Edit Page" button on or off (if applicable)
all
 
Turns all of the automatic markup on or off (default if neither header, body, or edit_page are specified)

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.

Related

{{ toggle }}

{{ 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.