DevCraft Документации
Шаблоны

Мои подписки v200.1.0

Шаблоны subscriptions.tpl и subscription_item.tpl — список подписок пользователя

Вставка: show_notifications.php?focus=subscriptions. Список собирает SubscriptionListRenderer.

subscriptions.tpl

ТегЗначение
{subscriptions-title}заголовок блока
{subscriptions}HTML строк
{subscriptions-empty-label}текст пустого списка
{subscriptions-empty-hidden}пусто, если список пуст; иначе hidden

Корень: dc-notify-subs. Список: dc-notify-subs__list. Пусто: dc-notify-subs__empty.

subscription_item.tpl

ТегЗначение
{id}id записи подписки
{type}код типа (news, cat, …)
{type-title}человекочитаемое название типа
{subscription-id}id объекта подписки
{title}заголовок объекта
{url}ссылка на объект
{date}дата создания подписки
{datetime}дата в формате ISO
{site-checked} checked или пусто
{email-checked} checked или пусто
{pm-checked} checked или пусто
{site-label}«На сайте»
{email-label}«Почта»
{pm-label}«ЛС»
{unsubscribe-label}«Отписаться»

Строка: класс dc-notify-sub, атрибуты data-id, data-type, data-subscription-id.

Переключатели каналов: dc-notify-sub-channel и data-channel="site|email|pm". Кнопка отписки: dc-notify-sub-unsubscribe.

<div class="dc-notify-sub" data-id="{id}" data-type="{type}" data-subscription-id="{subscription-id}">
	…
	<label><input type="checkbox" class="dc-notify-sub-channel" data-channel="site"{site-checked}> {site-label}</label>
	…
	<button type="button" class="dc-notify-sub-unsubscribe">{unsubscribe-label}</button>
</div>

См. также

На этой странице