-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NC12 ignores custom mail templates for the activity app #160
Comments
Yeah the app was migrated to the new email templating system. Not sure if that allows theming yet. What would youblike to change? Wording or styling? |
Wording. I temporarily fixed it with changing the corresponding strings within the.js / .json files |
You should be able to replace language files or parts of them with theming as well |
Hi, |
That's a server side issue, see nextcloud/server#5036 |
Which files should I edit when I want to modify the default email being sent @nickvergessen ? The default template uses |
That issue is being worked on in nextcloud/server#5075 |
Thanks! |
Where can I found more info about that new templating system and how it interacts with other apps? Are the only available infos these in the docs? Those don't explain much about integration with other apps, how different templates are distinguished from each other etc. I need to know how e.g. the activity app generates mails and how I can customize those entirely. I can't even find code in the app implementing $template = $this->mailer->createEMailTemplate('activity.Notification', [ But those calls don't explain where templates/classes/... need to be stored to customize things. |
I've found how individual templates are distinguished: public function __construct(Defaults $themingDefaults,
IURLGenerator $urlGenerator,
IFactory $l10nFactory,
$emailId,
array $data) {
$this->themingDefaults = $themingDefaults;
$this->urlGenerator = $urlGenerator;
$this->l10nFactory = $l10nFactory;
$this->htmlBody .= $this->head;
$this->emailId = $emailId;
$this->data = $data;
} The support portal has a freely accessible example app in which that public function addBodyButtonGroup(
string $textLeft, string $urlLeft,
string $textRight, string $urlRight,
string $plainTextLeft = '',
string $plainTextRight = '') {
// for the welcome email we omit the left button ("Install client") and only show the button that links to the instance
if ($this->emailId === 'settings.Welcome') {
parent::addBodyButton($textLeft, $urlLeft, $plainTextLeft);
return;
}
parent::addBodyButtonGroup($textLeft, $urlLeft, $textRight, $urlRight, $plainTextLeft, $plainTextRight);
} So in the end, there seems to ALWAYS be ONE implementation of
Though being an instance wide implementation, that is able to distinguish differently requested mails for different purposes by the given |
Steps to reproduce:
Expected behavior:
The notification mail uses the configured template (as it was in NC11)
Actual behaviour:
The configured template gets ignored. The mail includes the default template text.
Enabled apps:
Calendar 1.5.3
Contacts 1.5.3
PHP-Version: 7.1.1
OS: Embedded QNAP-Linux
The text was updated successfully, but these errors were encountered: