Simple Email Marketing
Home > Have a question? We're here to help. > Account how-to > Template style controls

Template style controls

Template style controls are available only to Emma HQ customers.

With Template style controls, you can control your design and brand by limiting the options your subaccount users have when it comes to selecting fonts, font sizes, text alignment, text colors and template colors. Style controls are set and locked within your Code your own templates created at the Assets level in your Emma HQ account. When Template style controls are applied, all users, regardless of permission level, will see the controls enabled when editing.

To get started coding your own template, click Create a new template and select the “Code your own Template” option. If you are unfamiliar with coding a template using this option, we recommend first reading this resource before getting started.

New template syntax

To lock styles and colors, you’ll want to insert the template tags [% locked_styles %] and [% preferred_colors %] within a <body> tag. With these tags, up to 6 colors can be set to display in the editor, with the option of disabling other colors from being selected. Additionally, you can lock style toolbar controls P, H1, H2, H3, H4 and the following Quote elements:

Button

Keyword

Button visibility

Bold

bold

visible, disabled

Italic

italic

visible, disabled

Underline

underline

visible, disabled

Unordered list

ul

hidden

Ordered list

ol

hidden

Indent

indent

hidden

Outdent

outdent

hidden

Align left

align-left

visible, disabled

Align center

align-center

visible, disabled

Align right

align-right

visible, disabled

Align justify

align-justify

visible, disabled

Font family

font-family

visible, disabled

Font size

font-size

visible, disabled

Text color

color

visible, disabled

Text background color

highlight-color

visible, disabled

Line height

line-height

visible, disabled

Locked styles

Locked styles are declared with the template tag, [% locked_styles %].

The tag will have a name attribute that can be one of the following:

  • normal

  • header-1

  • header-2

  • header-3

  • header-4

  • quote

Between the opening [% locked_styles %] tag and closing [%/ locked_styles %] tag, add a comma-separated list of all the style controls you want locked for that element type. For example, if you want to lock your subaccount users’ ability to change bold, italic, underline, unordered and ordered lists of your H1 style, you would use the following:

[% locked_styles name="header-1" %]

bold,italic,underline,ul,ol

[%/ locked_styles %]

If all style controls listed above should be locked for an element type, all can be substituted for a comma-separated list as a shortcut:

[% locked_styles name="header-2" %]

all

[%/ locked_styles %]

Multiple [% locked_styles %] tags can exist (one per possible name attribute). If multiple [% locked_styles %] tags exist in a template for a single element type, the last tag’s rules are applied to that element type.

The [% locked_styles %] tag should be placed within a body tag

Locked colors

To declare a list of preferred colors use the template tag, [% preferred_colors %].

Within the opening and closing  'preferred colors' tags add a comma-separated list of CSS-friendly color strings:

[% preferred_colors %]

#FFCC00,#ABC123,#0A0A0A,magenta

[%/ preferred_colors %]

The comma-separated list should not contain more than 6 colors. If more than 6 are declared, the first 6 will take precedence.

If the list of preferred colors are the only colors that can be chosen by a template's users, a locked attribute can be added to the tag:

[% preferred_colors locked="true" %]

#FFCC00,#ABC123,#0A0A0A,magenta

[%/ preferred_colors %]

The locked attribute's value can be either true or false, but if the attribute is absent, the value will default to false.

There should be only one preferred_colors tag per template. If there are multiple, the last-declared tag will take precedence.

The [% preferred_colors %] tag should be placed within a body tag

Last modified

Tags

Classifications

This page has no classifications.

Announcements

Emma phone support will be unavailable on November XX, between the hours of XX:XX and XX:XX. You can still contact support using the link above and we will respond as soon as we can.

App status