Recherche
...
Créez un répertoire templates dans templates/custom (se référer à cette page pour plus de détails sur l'utilisation du template custom). C'est dans ce répertoire que vous placerez ensuite tous les fichiers .ftl qui constituent le corps des messages envoyés.
...
Il convient maintenant d'éditer le fichier templates/custom/config/esup-notification-config.xml qui va surcharger les fichiers de configuration par défaut. Ce fichier se compose de deux points d'extensions : un pour définir nos notifications, le deuxième pour définir les templates ftl liés à ces notifications.
...
Bloc de code | ||
---|---|---|
| ||
<component name="org.esup.notification.service.NotificationContrib"> <require>org.nuxeo.ecm.platform.notification.service.NotificationContrib</require> <require>org.nuxeo.ecm.platform.comment.workflow.notification.service.NotificationContrib</require> <extension target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService" point="notifications"> <!-- first disable defaults notifications => no merge --> <notification name="Modification" channel="email" enabled="false"> <event name="documentModified"/> </notification> <notification name="Creation" channel="email" enabled="false"> <event name="documentCreated"/> </notification> <!-- then declare ours notifications --> <notification name="Esup Modification" channel="email" enabled="true" availableIn="Workspace" autoSubscribed="false" template="modif" subject="Modification du document ${docTitle}" label="label.nuxeo.notifications.modif"> <event name="documentModified"/> </notification> <notification name="Esup Creation" channel="email" enabled="true" availableIn="Workspace" autoSubscribed="false" template="create" subject="Nouveau document" label="label.nuxeo.notifications.create"> <event name="documentCreated"/> </notification> </extension> <!-- define template files --> <extension target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService" point="templates"> <template name="modif" src="templates/esupNotificationModifDoc.ftl" /> <template name="create" src="templates/esupNotificationCreateDoc.ftl" /> </extension> </component> |
Info |
---|
Cette configuration va créer de nouvelles notifications et désactiver celles par défaut de Nuxeo. Il faut donc de s'abonner aux nouvelles notifications. Si on était abonnés aux anciennes, on ne les recevra plus ! |