user500665
user500665

Reputation: 1362

Alternate ReceiverMail template in Powermail

I have 2 Powermail forms on a page and one needs a custom receiverMail template. How can I specify what template file to use based on the plugin instance?

My best guess would be to do something like this:

plugin.tx_powermail {
  view {
    templateRootPath >
    templateRootPath {
      10 = EXT:powermail/Resources/Private/Templates/
      20 = CASE
      20 {
        key.field = uid
        default = fileadmin/template/powermail/Templates/
        123 = fileadmin/template/powermail/Templates2/
      }
    }
  }
} 

Using the uid of the form element this doesn't work.

Upvotes: 0

Views: 961

Answers (1)

Alex Kellner
Alex Kellner

Reputation: 1299

I would do switch or a if condition in the HTML-template. Depending on a uid, a title or even better a value in layout field.

How to set own values in layout fields is described in the manual: https://docs.typo3.org/typo3cms/extensions/powermail/Faq/Index.html#how-to-change-the-style-selector-with-my-own-values-in-forms-pages-or-fields

Upvotes: 1

Related Questions