User Tools

Site Tools

Translations of this page:

placeholders

Full list of placeholders supported by phpList

What is a Placeholder

A placeholder is a special word enclosed in square-brackets, that stands-in for data that is to be inserted later on in the HTML and/or text message. In phpList, placeholders hold the place for dynamic data and provide an effective way to personalize messages.

Besides the built-in placeholders, you can use your own custom placeholders, based on the user attributes you defined for your subscribe page. Placeholders are always enclosed in square-brackets, are case sensitive, and can usually be used both in the message content and the template.

Note: Words enclosed in square-brackets are always considered to be placeholders. Non-placeholder content contained within square brackets -either in HTML or text messages- is removed when the message queue is being processed.

Built-in placeholders

System Messages:
CR - Confirmation Request (Message they receive when they subscribe)
CM - Confirmation Message (Message they receive when they confirm their subscription)
CP - Confirmation Preferences (Message that is sent when users change their information)
CU - Confirmation Unsubscription (Message users receive when they unsubscribe)

Custom placeholders

Custom placeholders are based on the user attributes you defined for your subscribe page. When editing a message, you can see which custom placeholders you may use by clicking on the ? next to “Message:”. These placeholders will be replaced by the values corresponding to each user when the message queue is being processed. Currently, custom placeholders only work in list messages, and are not yet supported in system messages.

Using placeholders - examples

  • This example illustrates how you could use both built-in and custom placeholders. The following user attributes were created for the subscribe page and can be used as custom placeholders by enclosing the attribute names in square-brackets:

Dear [FIRSTNAME],

You are currently registered in our database system with the following personal data.

First name: [FIRSTNAME]
Last name: [LASTNAME]
Address: [ADDRESS]
City: [CITY]
Zip code: [ZIPCODE]
State or Province: [STATE OR PROVINCE]
Country: [COUNTRY]
Profession: [PROFESSION]

Email address: [EMAIL]

If you want to change any of your personal details, please click on this link and you will be transferred to your preferences page:
[PREFERENCESURL]

Please visit us again at our website: [WEBSITE]
USER ATTRIBUTE CUSTOM PLACEHOLDER
FirstName [FIRSTNAME]
LastName [LASTNAME]
Address [ADDRESS]
City [CITY]
ZipCode [ZIPCODE]
State or Province [STATE OR PROVINCE]
Country [COUNTRY]
Profession [PROFESSION]

From version 3.2.2 onwards phpList has a method to define and use a logo in campaigns. The logo will be included in the campaign content, and display in the message even if subscribers block access to images.

This functionality requires PHP5.4 or up.

Logo setting

To set the logo, you can upload an image to the settings for Logo. You can upload a PNG or JPG image with as best quality as you have.

Use in templates

Once you have uploaded your logo, you can use it in templates and the content of your campaigns. You can use it as the “src” of the image.

Eg

<img src="[LOGO]" width="X" height="Y" alt="*" />

This will include the Logo as uploaded.

<img src="[LOGO:300]" alt="*" />

This will include the logo with the largest side being 300 pixels.

Add us to your Address book

From version 3.3.9 onwards phpList supports the [CONTACT] placeholder for inserting link to vCard that contains your contact Information.

[CONTACT] Settings

The [CONTACT] placeholder is used to insert a trackable link to a virtual contact card (vCard) with your organisation’s details included.
The file can be imported by subscribers into their local device or mail client address book, and help avoid client-side spam filtration. The vCard itself includes information such as: Organisation name, From address (sender) and Organisation URL. Support for non-HTML text-format messages is also included.

Use in templates

[CONTACT]- in the simplest form explained is a link where the recipient can go to Download your contact information and add you to their whitelist/contacts.

The default text for this placeholder is Add us to your address book.

For example, if you use on the footer the “If you don't want to miss any of our emails please [CONTACT]”, it will come out on the email as:

If you don't want to miss any of our emails please Add us to your address book.

Please consider that the [CONTACT] placeholder is not shown on the template preview.

placeholders.txt · Last modified: 2019/04/04 14:50 by suela_phplist.com

Resources
Contact Us

e: info@phplist.com

Boring Bit

phpList is a registered limited company

UK Company No. 07582966

VAT Registration 122 0788 37

© phpList 2016