Using placeholders: manual chapter feedback and discussion

Feedback on the following chapter:

If you have related fields, for instance [NAME], [FIRSTNAME], [LASTNAME] but not all fields are necessarily filled out, you can use placeholders nested, as fallback words. For instance:

Hi [FIRSTNAME%%[NAME%%there]],

In this example [FIRSTNAME] is used, but if that field is empty, [NAME] will be used, unless [NAME] is empty as well, in which case ‘there’ will be used.

1 Like

You could consider merging the attributes FIRSTNAME and NAME however

In my case I have a field [NAME] that contains the full name of a person (it is the only field required to sign up for a newsletter (aside from the email address). The [FIRSTNAME] field is empty for those people.

I have another list where, during import, I also populated [FIRSTNAME].

When I send an email to both lists (or some users may be on the two lists), I want to address them with their first name, and if not present with their full name. Hence that syntax and use.

1 Like


Hi Bob

Hi Bob Smith

or Hi there

could be the results?

Fab! I am trying to think of other uses so we can give more examples.

I am not great at constructing them

What if we wanted to do something like

“Sale on ladies size 7 shoes” as an example filled in
"Sale on your size of shoe" as the fallback with
or “sale on ladies shoes”

Something like Sale on [[GENDER][SHOESIZE]%%your size of]shoes ?

Exactly !

I think that is not correct, nesting is not needed here, following should do however:

Sale on [GENDER] [SHOESIZE%%your size] shoes

If [GENDER] is empty, nothing is put (provided the bug in 3.0.12 is fixed)
If [SHOESIZE] is empty ‘your size’ is used

1 Like

True :slight_smile: Can you think of another example where nesting is needed? Or perhaps we can make a generic formula [x%%[y]] or something?

Frankly, no !?
It is only useful for related fields, where the most optimum may be empty but then the other will do too.

Perfect explanation!!

1 Like

Ref: Page 131 of the pdf manual. (bottom)


[FORWARD] is a link where the recipient can go to “forward this
message”. The default text for this placeholder is this link.

For example, if you use “If you want to forward this message to a
friend click [FORWARD]”, it will come out as:
---------- something seems to be missing in here -----------

I’m a neophyte at this, so I hope I’m close to the right area for these observations.

On this page: Using placeholders | phpList manual
. . . is this error: DONWLOAD THIS MANUAL

@samtuke Not sure who else to tell Sam, the download link is at the very top right of the page.

Thanks @dragonrider, the link should lead to this page, where various formats of the manual can be downloaded:

Which bit isn’t working?

@samtuke It works, but the text for the link is mis-spelt. DONWLOAD rather than DOWNLOAD

Good catch, now fixed. Thanks!

Thanks @samtuke but was spotted by @perry in first instance. Thanks go to @perry for that and for letting us know. Many thanks.

Thanks @perry! Much appreciated

May I suggest to include in the documentation a full list of supported system placeholders. I see some on the old documentation.

And particullary, as it required some testing and found it on al old forum thread… Foreign Key which I understand has to be invoked as [foreignkey] to make it work.