The Table of Contents merge tag (*|MC:TOC|*) automatically generates a pre-formatted Table of Contents by checking for any title or heading text in your campaign. We'll show you how to use this merge tag to create the Table of Contents below. If you want a bit more control over how the Table of Contents appears in your campaign you'll want to manually create and link anchors in your text.

The merge tag creates an unordered list (with bullet points) with the titles from your content. Each item in the Table of Contents will link to that title in the campaign so your subscribers can jump ahead to that content (as long as their email program supports anchor links).

Adding the Merge Tag

To set up the *|MC:TOC|* tag in your campaign simply follow these steps:

  1. In the Design step of the Campaign Builder, click edit to pull up the section where you want to add the Table of Contents.
  2. In the content editor either type the merge tag (*|MC:TOC|*) in directly or select the tag from the Merge Tag drop down in the toolbar.
  3. Click Save Now to exit the edit window.
    *|MC:TOC|* tag added

Formatting Your Content Titles

The *|MC:TOC|* dynamic merge tag works by pulling any text from your email that is formatted as Title text, TOC Title, or TOC Header style.

Using the Content Editor

  1. Create the text you want to link in the Table of Contents and then highlight that text.
  2. On the toolbar, choose theStyles drop down option.
  3. From the drop down menu select one of the options for Title text, TOC Title, or TOC Header styles to be applied to the text.
    Choose a Title or TOC Header style

Working With Custom Code

When coding your own HTML, add class="title" or class="mc-toc-title" to your HTML tags for any titles to be included in the Table of Contents. For example, you might have tags in your HTML that look like one of these:

<span class="title">
<h1 class="title">
<h2 class="title">
<div class="title">

The two classes, "title" and "mc-toc-title" can be used interchangeably in the same campaign to create one Table of Contents.

The *|MC:TOC|* tag will then recognize the text and create the proper anchor.

Results

Once your Table of Contents merge tag has been added you can preview the campaign using the Popup Preview or sending a test to see how it will appear in the final send. To view the preview click on the Popup Preview button at the top of the Design Step in the Campaign Builder.
Campaign Preview with the Table of Contents created

If the Table of Contents doesn't appear in the preview or test test send then the text you're anchoring to may not be formatted with the correct style. Check the text using the Styles dropdown or click the Source button in the edit window to make sure the correct styles have been applied.
Choose a Title or TOC Header style


Related Articles