PeopleVine

Sample Code - Newsletter - Include upcoming events

PeopleVine provides an HTML language that you can leverage to dynamically include events and other content stored within other components of PeopleVine.  This will language will then dynamically generate the relevant content at the time it's rendered.

In this example, we will show you how you can create a monthly email newsletter which includes the following months events.

  1. Go to Newsletters and setup a new newsletter.
  2. In the HTML of the newsletter, enter the snippet below and adjust the settings.
  3. Once completed, select the recipients you want to send to.
  4. Then you can schedule the newsletter to go out on a recurring schedule.

Now when the email is sent out, it will automatically populate the data as specified.

 

<div class="" data-pv-component="event" data-pv-parameters="{category_no: 340, date_from: {@nextMonthStart@}, date_to: {@nextMonthEnd@}}" data-pv-type="eventList">
    <!-- Text -->
    <table align="center" class="layout layout--no-gutter" style="border-collapse: collapse;table-layout: fixed;Margin-left: auto;Margin-right: auto;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #ffffff;">
        <tbody>
            <tr>
                <td class="column" style="padding: 0;text-align: left;vertical-align: top;color: #60666d;font-size: 14px;line-height: 21px;font-family: sans-serif;width: 600px;">
                    <div class="" style="Margin-left: 20px;Margin-right: 20px;Margin-top: 20px;">
                        <p style="text-align: center; margin-top: 0px; margin-bottom: 20px;"></p><span data-pv-element="event_date" data-pv-formatter="date(dddd, MMMM dd h:mmtt)" style="font-weight: bold;">EVENT DATE</span><br>
                        <br>
                        <h2 data-pv-element="event_title" style="Margin-top: 0;Margin-bottom: 0;font-style: normal;font-weight: normal;color: #43464a;font-size: 20px;line-height: 28px;">EVENT TITLE</h2><br>
                        <p></p>
                        <div style="text-align: left;">
                            <span data-pv-element="event_summary">Event Summary</span><br>
                        </div>
                        <p></p>
                    </div>
                    <div style="Margin-left: 20px;Margin-right: 20px;Margin-bottom: 24px;">
                        <div class="btn btn--flat" style="text-align:center;">
                            <a href="http://yourdomain.com/event/{@event_no@}" style="border-radius: 4px;display: inline-block;font-weight: bold;text-align: center;text-decoration: none !important;transition: opacity 0.1s ease-in;color: #fff;background-color: #91bc3c;font-family: sans-serif;font-size: 14px;line-height: 24px;padding: 12px 35px;">Register Now</a>
                        </div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table><!-- Break -->
    <table align="center" class="layout layout--no-gutter" style="border-collapse: collapse;table-layout: fixed;Margin-left: auto;Margin-right: auto;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #ffffff;">
        <tbody>
            <tr>
                <td class="column" style="padding: 0;text-align: left;vertical-align: top;color: #60666d;font-size: 14px;line-height: 21px;font-family: sans-serif;width: 600px;">
                    <div style="Margin-left: 20px;Margin-right: 20px;">
                        <div class="divider" style="display: block;font-size: 2px;line-height: 2px;width: 40px;background-color: #bfbfbf;Margin-left: 260px;Margin-right: 260px;Margin-bottom: 20px;">
                            &nbsp;
                        </div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</div>
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.