We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8168
    • 1,118 Posts
    Quote from: sottwell at Jan 03, 2016, 08:49 PM
    You might be able to use a post hook that runs before the email hook, and in that hook use the POST to build the tpl. I'm not sure if you can use @INLINE for the email tpl; if you can you could simply modify the emailTpl property value as passed to the hook. Otherwise you would need to actually build a chunk programmatically, so that it will be the same chunk name as the one specified in the emailTpl, but its content will change in the database as required.

    Thanks Susan. Sounds like that approach might work.... Would you be able to help me with this? I can't get my head around how such a post hook would be coded due to my lack of knowledge of PHP...

    Let me know.
    • Not right now, it's almost midnight here and I'm getting a bit fuzzy. I'll think on it, and if you don't get anything done before tomorrow, I'll see what I can come up with. Actually I'm doing something similar involving dynamic TV-fed emailTo addresses, so what I'm doing should be applicable to your problem.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 8168
        • 1,118 Posts
        Thanks Susan. I will have a go - but not sure I posses the skills to make it work - would really appreciate your insight here if you have something similar which you get working which the logic could apply to this. Many thanks.
          • 8168
          • 1,118 Posts
          Quote from: sottwell at Jan 03, 2016, 09:48 PM
          Not right now, it's almost midnight here and I'm getting a bit fuzzy. I'll think on it, and if you don't get anything done before tomorrow, I'll see what I can come up with. Actually I'm doing something similar involving dynamic TV-fed emailTo addresses, so what I'm doing should be applicable to your problem.

          Hi Susan, I have had no joy in getting a solution to work here - did you per chance have any joy?
          • discuss.answer
            • 8168
            • 1,118 Posts