January 28, 2016 Development Tips

Full HTML Toolbar for Kentico Notification Templates

By: Laura Frese

You may have noticed that when setting up email notification templates in Kentico you are limited to a basic toolbar, significantly limiting the styles you can add to the template. In this post I provide a quick tip on how to get the full toolbar so you can add more style to your notification emails. This is very useful when you want to include a custom header and footer when sending emails to users that have subscribed to content notifications.  

Basic toolbar
 

Unfortunately, it is not possible to do this through Kentico's interface, you have to have access to the server to modify the file. Keep in mind, this change may be reverted during updates.

Open the following file

\CMS\CMSModules\Notifications\Controls\TemplateTextEdit.ascx.cs

In the PageLoad method at approximately line 91 change htmlText.ToolbarSet from "Basic" to "Full"


 

That's it, you now have a full toolbar to style the email template with.
 

Alternatively, if you favor transformations (which I do), then you could also take advantage of the Apply transformation macro method. Using this super cool method you simply apply the data to a transformation.   

You can either include the transformation in a page type, or create a content only page type. Within the transformation, select Text/XML as the transformation type and enter the macros as you would have in the notification template.


Notification Transformation
Share: