larger smaller normal text version of this page
Phplist Documentation » Message functions » Send a message »

Placeholders



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


PLACEHOLDER ALLOWED IN ALLOWED IN DESCRIPTION

list messages syst.messages
[CONFIRMATIONURL] -- CR The URL with user's UID used for confirmation request email
[CONTENT] Template -- This is where the message's content (body) will be inserted. Every template must have a [CONTENT] placeholder
[DOMAIN] Template/Content CR/CM Your domain, e.g. yourdomain.com
[EMAIL] Template/Content -- The user's email address
[FOOTER] Template/Content
The message footer
[FORWARD] Template/Content -- Will add a link to the message that goes back to your website to fill out a little form, enter an email address and it will send the related newsletter to that email address, as if it were from the user who is forwarding
[FORWARDFORM] Template/Content -- Adds the email entry box to the HTML message, and points back to the site as well, to do the actual forwarding
[FORWARDURL] Template/Content -- The location (URL with UID) for forwarding a message
[LISTOWNER] -- (???) -- (???) The name of the admin who 'owns' the list (***remark: still needs verification)
[LISTS] -- (???) CR/CM/CP/CU Provides a listing of the lists (newsletters) the user is subscribed to
[PREFERENCES] Template/Content -- A link to the preferences page of that particular user (includes a UID)
[PREFERENCESURL] Template/Content CR/CM/CP/CU The location (URL with UID) of a user's preferences page, i.e. the page where the user can update his/her personal details and preferences
[SIGNATURE] Template/Content -- The powered by phplist v 2.10.3, tincan ltd signature
[SUBSCRIBE] Template/Content -- A link to the subscribe page
[SUBSCRIBEURL] Template/Content CR/CM/CP/CU The location (URL) of the subscribe page
[UNSUBSCRIBE] Template/Content -- A link (with UID) to the unsubscribe page
[UNSUBSCRIBEURL] Template/Content CR/CM/CP/CU The location (URL with UID) of the unsubscribe page
[USERDATA] -- (???) CP The user's data and preferences
[USERID] Template/Content -- The user's UID
[USERTRACK] Template/Content -- This will insert an invisible tracker image in your message (HTML messages only)
[WEBSITE] Template/Content CR/CM Your website's address, e.g. www.yourdomain.com
[URL:HTML_Page_to_send] Template/Content -- An HTML page you want to send as body of the message, e.g. [URL:http://www.yourdomain.com/newsletter1]


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 - an example


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]











Related pages

CategoryDocumentation
Page was generated in 0.0811 seconds