Quick facts
- “Render-Target” is the formal name for the later environmental context the template is rendered for.
- The render-targets primarily differ in terms of the finally generated (non-) public urls, available session-data, Hublify-data access in general and last but not least the user’s “technical environment” like: browser with or without Hublify’s angular app or email-(web-) clients.
In the following sub-sections, the specialties of the render-targets are described.
Render-Target “Website”
“Pages”
Render-Target “E-Mails (Trigger, Action, Newsletter)”
Render-Target “Hublify Messages: Emails”
The Hublify App “Messages” uses for creating the email’s html source code the Hublify template-engine as well.
This app adds some comfortable post-render-features that you can prepare & control already during rendering with your templates.
Specialties
• <hfy-…> tags - “all-in-one-template"
(optional usage)
• _MSG_COMPOSE_ - array / configuration
The problem
A common problem when composing an email’s different parts such as: subject, body, to, cc, bcc, from and attachments that these parts are each rendered independently by standalone templates.
Example 1: For a truly personalized marketing email the subject shall contain the names of the first two products advertised in the email’s body!
Example 2: For an order-confirmation email you want to attach different standard or individualized PDFs depending on ordered products and the targeted delivery-country!
Example 3: For an your-open-invoices email you want to attach invoice-PDFs and summarize and display the open amount in the email’s body-content and subject.
The solution
Commonly used special tags are
<hublify-msg-email-to>
...
Example
<hublify-msg-email-to> humptydumpty@hublify.io </hublify-msg-email-to>
<hublify-msg-title>
... For emails, this will be used in the email's subject.
<hublify-msg-body-html>
... For emails, this will be used as the email's HTML body content.
Of course, this shall contain HTML source code.
<hublify-msg-body-txt>
... For emails, this will be used as the email's plain-text body content.
Of course, this shall contain only plain-text, UTF-8 encoded.
<hublify-msg-attachment>
For easily append file attachments to the message.
The attached files can be stored in the Hublify MAM or even be generated on-the-fly!
Example
<hublify-msg-attachment>{{ attchPdfDoc|json_encode() }}</hublify-msg-attachment>
Render-Target “System E-Mails” (to Hublify Users)
...
Render-Target “Hublify App” (angular)
Specialties
• <hfy-…> angular components.
See: …
Render-Target “PDF” (html2pdf converter)
Specialties
• <hfy-header>
• <hfy-footer>