Modify email templates - Folder hierarchie explanation ?
Hi,
We’ve received the workflow notification mail, with the list of workflows assigned to us.
We want to change some stuff in it.
For logo, title, footer, I’ve read the exclent subject
https://datacitizens.collibra.com/forum/t/change-subject-and-adding-logo-in-email-template/605
I’ve also read these articles
https://productresources.collibra.com/kb_article/adding-custom-email-templates/
and
https://cdn-university.collibra.com/wp-content/COOK/Customizing-Email-Templates_3834098.html#CustomizingEmailTemplates-LocatingtheGeneralEmailTemplateLogoandStyling
So I see there is a general styling.vm
in which we have the general html template (the look and feel) for mail, with some variables like $emailTitle, $sendDate and $content
and then we have subfolders per mail category, like “workflow-notification”.
Inside workflow-notification, we have body-en.vm and subject-en.vm
with content are respectively:
$content
and
$msg.get("workflow.notifications.title")
and then in subfolder task-assigned (I suppose it’s for the mail I’ve received), we have 2 files:
container-em.vm
and
user-task-assigned-en.vm
#set($baseUrl = $applicationComponent.getBaseURL())
#if ($item.url)
#if ($user.isGuestUser())
#set($url = $item.url + '?signinrequired=false&task-id=' + $task.getId() + '&user-id=' + $user.getId())
#else
#set($url = $item.url + '?signinrequired=true&task-id=' + $task.getId())
#end
#else
#if ($user.isGuestUser())
#set($url = ${baseUrl} + 'tasks/my?signinrequired=false&user-id=' + $user.getId())
#else
#set($url = ${baseUrl} + 'tasks/my?signinrequired=true')
#end
#end
$msg.get("workflow.notifications.taskassigned.newtask", "<a href='$url'>$task.title</a>")
#if($item.id) $msg.get("workflow.notifications.taskassigned.businessitem", "<a href='$item.url'>$item.name</a>") #end
#if($task.description) $task.description #end
And so we see that with the $msg.get(…) it use translation feature.
workflow.notifications.taskassigned.newtask = A new {0} task has been assigned to you.
workflow.notifications.title = Workflow Notifications
–> I get my email content here.
Is there any some explanation on how each file are used?
So it firstly used styling.vm with some variables.
These variables must be replaced by their values… which are define in ohter .vm files…
If I understand well, it used the following files in this order:
[root] styling.vm ($content) > [workflow-notification] body-en.vm ($content) > [task-assigned] container-em.vm ($content) > [task-assigned] user-task-assigned-en.vm
How do we know that user-task-assigned-en.vm define the value of the variable $content of the file styling.vm ?
Regards,
Alex
alexandrebargeton
OP4 years ago · EditedYes we can use MailTask… but some mails are automatically sent.
Example the workflow notifications which list all workflow assign to the user (receiving the mail).
And I do not know where it’s setup to send this email to the user.
arthurburkhardt
·4 years ago · EditedVery good post, Alexandre! Very detailed, I can see you’ve done some research.
So far, I have complained about this same lack of documentation, clarity, guidance, and the answer I received is: “Email notification customization is not a supported component of the platform, hence the lack of documentation”
So while it works, you mostly have to figure it out through trial and error and tribal knowledge.
That refers to my topic about Technical documentation: missing sections, “magic” and new releases -
Product Q&A - The Data Citizens Community (collibra.com)
Quite a few collibra developers have abandoned the use of the collibra email templating approach and use MailTask instead.
It might be good to submit ideas to the ideation platform for better email support.