This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Notification templates ===== {{tag> notification template configuration}} ==== System templates ==== If you tick a template as a system one (either in the form of FE or in XML), for this template it will not be allowed to change the attributes of FE forms: system template indication, parameters, and code. System templates are closely tied with BE; currently it isn't allowed to change any of their attributes. ==== Templates and FE ==== We can edit templates (html, text, subject) using a simple WYSIWYG editor. {{:navrh:sni_mek_obrazovky_2017-03-10_v_10.44.38.png|}} This WYSIWYG editor allows simplified filling template parameters with putting character **$**. After we put this character into editor, we are offered a current list of parameters: {{:navrh:sni_mek_obrazovky_2017-03-10_v_10.47.18.png|}} We can use any available style from WYSIWYG editor for parameters and their combinations. <note important>Style MUST be applied on all parameters including character **$**. The style can't be applied for merely one part of parameters. See examples</note> **Well applied style to parameter:** {{:navrh:sni_mek_obrazovky_2017-03-10_v_10.50.53.png|}} **Poorly applied style to parameter:** {{:navrh:sni_mek_obrazovky_2017-03-10_v_10.51.46.png|}} ==== Deploy of templates from an external source ==== <note tip>For setting up an external folder with templates, you can use the property '**idm.sec.core.notification.template.folder**' and value `classpath*:/eu/bcvsolutions/idm/templates/, file:/home/some_user/templates/`. </note> === XML template structure === A template saved in resources as an XML file has the following structure: <code xml> <?xml version = "1.0" encoding = "UTF-8" standalone = "yes"?> <!-- Description of the template and its parameters --> <template> <name>Template name</name> //code//Unique template code///code// <subject>Notification subject</subject> <bodyHtml>Notification body, html can be used (if using html, don't forget the CDATA! block)</bodyHtml> <bodyText>Notification body without html.</bodyText> <parameter>Notification parameters, separated by a comma</parameter> <systemTemplate>Indication whether it is a system template, see system templates for more</systemTemplate> <moduleId>Module identifier for which the template is created, informative indication on the FE</moduleId> </template> </code> Schema for an XML file can be found in the XSD file: [[https://github.com/bcvsolutions/CzechIdMng/blob/develop/Realization/backend/core/core-impl/src/main/resources/eu/bcvsolutions/idm/templates/IdmNotificationTemplate.xsd|IdmNotificationTemplate.xsd]] All template elements are required. It is **desirable** to place only one template within one file, i.e. one root element template. Loading of templates is currently done at the start of the application only if there isn't **any other** system template. ==== Redeploy and backup ==== In the notification template agenda, it is possible to restore/redeploy/refresh templates that are in the resources. For templates that cannot be found there, it isn't possible to apply restore/reload/refresh process. It is possible to back up all templates regardless of their origin. For backup and redeploy, you must enable this configured property: idm.sec.core.backups.default.folder.path= If configuration property is set and no folder exists, the folder will be created. CKG Edit by kotisovam Log In