up

Editables

 

Using {editables}

To make an area editable in your template add the following around the content that should be editable:

    {editable name="main"}This is the editable content{/editable}

Please note: that the name needs to be unique in the template and should only contain alphanumerical characters (space in the name is not allowed).

The attribute 'name' of 'editable' should be unique within the template and can contain any characters. We recommend that you name it something that is easily understood and recognized by anyone using the template.
    
Let's take a look at a simple example, given the following HTML before any modification:
<html>
    <head>
        <title>We are welcoming beta testers</title>
    </head>
    <body>
        <h1>
            Hello Joe!
        </h1>
        <p>
            This is the main content of this mail.
        </p>
    </body>
<html>
You will now want to make parts of it editable and also have the subject dynamic so that you can re-use the template for later mailings. Oh, let's also be personal, use the recipients first name in the editable part of the headline.

Please note! In order to keep maximum flexibility we actually do not allow "data substitutions" (things that come from your database) in the actual template. The primary reason is that one would not want a template to make any assumptions on the data. So when you want to use substitution commands like e.g. {$firstname}, put them in an {editable}!

Based on the HTML above, your final template would look something like this:
<html>
    <head>
        <title>{$mailsubject}</title>
    </head>
    <body>
        <h1>
            {editable name="headline"}Hello {$firstname}{/editable}
        </h1>

        {editable name="maintext"}
        <p>
            This is the main content of this mail.
        </p>
        {/editable}
    </body>
<html>
Note that {$firstname} would have to be available in your data for the personalization to work.

Please don't nest {editable}'s :-)