# Хуки для кастомизации дайджестов и уведомительных писем

**URL:** <https://meta.discourse.org/t/hooks-for-customization-of-digest-and-notification-emails/164394>\
**Category:** Feature\
**Created:** [17.Сентябрь.2020 22:13:46 UTC](https://meta.discourse.org/t/hooks-for-customization-of-digest-and-notification-emails/164394 "2020-09-17T22:13:46Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![thoka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thoka/32/115652_2.png) [@thoka](https://meta.discourse.org/u/thoka)\
**Post date:** [15.Февраль.2025 07:33:39 UTC](https://meta.discourse.org/t/hooks-for-customization-of-digest-and-notification-emails/164394/4 "2025-02-15T07:33:39Z")

</div>

Насколько я понимаю, `digest_custom_html` и `digest_custom_text` уже реализуют хуки для [`digest.html.erb`](https://github.com/discourse/discourse/blob/main/app/views/user_notifications/digest.html.erb) и [`digest.text.erb`](https://github.com/discourse/discourse/blob/main/app/views/user_notifications/digest.text.erb). Таким образом, базовая реализация этой задачи потребовала бы добавления дополнительных хуков?

Более продвинутая реализация могла бы включать подшаблоны, которые позволяли бы авторам плагинов использовать стили и код форматирования, поддерживаемые командой Discourse.

Правильно ли я понимаю, что ваша реализация возможна при добавлении одного хука `digest_custom_html("before_preheader")` в [`digest.html.erb`](https://github.com/discourse/discourse/blob/main/app/views/user_notifications/digest.html.erb)?

---

_[View the full topic](https://meta.discourse.org/t/hooks-for-customization-of-digest-and-notification-emails/164394)._
