Homespacer>spacerMergemill Tags Guidespacer>spacerSections Tags

spacer

Content Field

Expression

Looping

Branching

System Values

Statistics

Sections

Example

spacer

Variables

<?Vr: vName?> ... <?/Vr?>
<?
vName?>
<?
vName@NumFormat?>

If you have a block of content that repeats in the same template, you may assign it to a variable using the assignment tag-pair <?Vr:vName?> and <?/Vr?>, where vName is the variable name you provide, under the constraints of the same rules in naming fields. The value assigned can then be inserted repeatedly using the variable-insertion tag above, with or without the NumFormat.

Once a variable value is assigned, it stays constant till its next assignment block, or the next time the same assignment block is run. A variable assignment block is always excluded from the output text. To include it, simply follow the block by a variable-insertion tag.

To avoid mistakenly using Mergemill reserved words, such as YearNum, as a variable name, you are advised to begin all variable names with "v", like vMyVariable.

Variables––without the tag markers <? and ?>–– may be included as operands in an expression, and as check values in IF and CASE tags. Please note, however, that a variable name will only be recognized by Mergemill AFTER its assignment block.

spacer
Hide

<?Hd?> ... <?/Hd?>

These tags mark out a hide section in the template. Nothing in the section will appear in the output. All Mergemill does with the section contents is to create tasks for the new fields found. This enables you to include data feeds that are used only for generating output paths and output file names. By using the hide tags, you may also include comments or whitespaces that you don't intend to show in the output.

Since all contents except field tags in a hide section are ignored by Mergemill, any structure (IF, CASE, and LOOP) and section (email, speech, and variable assignment) that extends partially into a hide section will be broken and causes a template error.

spacer
Speech

<?Sp?> ... <?/Sp?>
<?Pause: Count?>

The Sp tag-pairs mark out a speech section in the template. On Windows, an Sp section adds its contents to the speech queue to be spoken by the speech synthesizer of the OS. On Mac OS X, an Sp section purges the speech in progress first so that the text will be spoken immediately.

If you actually wish to turn the entire output text––the concatenation of text strings outside section blocks––to speech or an audio file, specify the appropriate job output action. In this case, text inside Sp sections are still spoken by the speech synthesizer, and at the end the output text is converted to speech or an audio file.

You may use the speech tags to add voice alerts to an otherwise silent file output job, or use them to read out emails or web pages. Using Mergemill's auto-run feature, you may also easily create a self-running voice announcement system.

Since Mergemill generates output much faster than the speech synthesizer speaking them, you may need to slow down Mergemill. To do that, you may use the <?Pause:count?> tag, where count is the pause interval in seconds. Count values less than one are not allowed and will default to one second. Please note that this tag does not add a pause between speech texts, but rather asks Mergemill to wait for a set interval before continuing the job processing. So the pause tag may have other applications as well.

Suppose you want your computer to speak some long pieces of text for 10 seconds each, and pause for 2 seconds in between, you may do it with these tags:

<?Loop?><?Sp?><?[Field_Long_Text]?><?/Sp?><?Pause:10?><?Sp?> <?/Sp?><?Pause:2?><?EndLoop?>

Please note that there is a space between the second pair of Sp and /Sp tags. You may specify Field_Long_Text to fetch pieces of text from a folder of files, a list of webpage URLs, or emails.

spacer
Email

<?EmFrom?> ... <?/Em?>
<?EmTo?>
... <?/Em?>
<?EmCC?>
... <?/Em?>
<?EmBCC?>
... <?/Em?>

<?EmSubj?> ... <?/Em?>
<?EmHTML?>
... <?/Em?>
<?EmText?>
... <?/Em?>

<?EmFile?> ... <?/Em?>

If you choose "Send emails" as the job output action, use these tag-pairs to mark out the various sections in the template.

You may use a simple field tag to put one email address into each of the FROM, TO, CC, and BCC sections. Each run of the template will then send one email to the TO recipient, and copy it to the CC and BCC recipients. Things work a bit differently if you use loop tags to place a list of comma-separated email addresses into the sender and recipient sections. Mergemill picks the first email address in the FROM section as the sender. Each run of the template will send a copy of the email to each of the TO recipients, and copy the same email to the CC and BCC recipients as well. If you wish to send out personalized emails, don't use loops in the recipient address sections.

The SUBJ section contains the subject line. The HTML section is for the HTML version of the message, where TEXT is for the plain text version.

Please note that all email sections mentioned above should be used only once in a template, otherwise the last one will overwrite preceding sections of the same type. The only exception is the tag-pair <?EmFIle?>...<?/Em?> that adds email attachments. You may use it multiple times in a template to include more than one attachments in the emails.

Consider the following template example:

<?EmFrom?>info@crossculture.com.hk<?/Em?>
<?EmTo?><?[Contact_Email]?><?/Em?>
<?EmSubj?><?[First_Name]?>, here is your monthly marketing report<?/Em?>
<?EmFile?><?If([membership]=premium)?>Mac HD:Documents:Monthly Mailings:Reports:p201404.pdf<?Else?>Mac HD:Documents:Monthly Mailings:Reports:201404.pdf<?EndIf?><?/Em?>
<?EmText?>Hi <?[First_Name]?>,

 

We have put together in this report some little known yet highly valuable marketing information for you...

...

P.S. Just in case you missed it last month, our popular report "financial outlook 2014 Q2" is also attached.

<?/Em?>

<?EmFile?>Mac HD:Documents:Monthly Mailings:Reports:2014q2.pdf<?/Em?>

You may easily use Mergemill Pro to get the local file paths for your attachments. Use the Get button on the Source: Folders or Source: Files page, and copy the File Path/URL text string to your template. Since Mergemill Pro only allows you to register text files, you may need to get the folder path and then add the file name, or get the file path to a dummy text file in the same folder and then change the file name.

spacer

spacer

Content Field

Expression

Looping

Branching

System Values

Statistics

Sections

Example

spacer

Top of Page

Featuresspacer::spacerDownloadsspacer::spacerBuy Nowspacer::spacerSupportspacer::spacerTutorialsspacer::spacerTags Guidespacer::spacerSite Map


Copyright © 2001-2017 Cross Culture Ltd. All Rights Reserved.