-
- 4,213 Posts
Hello,
I'd like to know what placeholders can be used in the emailTpl of ForgotPassword snippet as they are not specified in the
documentation.
Looking at the code in GitHub from
here onwards, it seems that the snippet retrieves the
user and profile as arrays into the properties array that is ultimately fed to $this->modx->getChunk, so I guess it's all there.
But what are the placeholders for various data, for example user's full name? Is there any function or something that I could use in the chunk to make it dump all available placeholders?
Is there any documentation about the available placeholders for the various snippet templates? ..at least for the ones that are developed by the core team? Can't seem to find any...
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
-
- 24,544 Posts
-
- 4,213 Posts
Thanks, but for example [[+fullname]] doesn't seem to be available in ResetPassword template. [[+username]] is and perhaps also some other fields, but don't know what.
Isn't there a way to dump somehow available placeholders from the template with some snippet code? Or are the template placeholders readable by a snippet in the same template?
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
-
- 24,544 Posts
Hmmm . . . I assumed that it used $modx->toArray() and set all the placeholders. I looked at the code, and it looks like it doesn't set anything but the email and username.
You might try putting this in the email Tpl chunk:
I'm not sure it would work. If not, you might be able to get the user object yourself and set a placeholder in your own snippet, called at the top of the page. The Profile snippet might also work there.