-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make more than one notification counter #56
Comments
Hi, this should be doable by using different Dom elements: https://github.com/machour/yii2-notifications/blob/master/docs/Usage.md |
Hi Machour thanks alot for the reply, <li class="dropdown notifications-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
<span class="label label-danger notifications-icon-count"></span>
</a>
<ul class="dropdown-menu">
<li class="header">Anda memiliki <span class="notifications-header-count">0</span> notifikasi</li>
<li>
<ul class="menu">
<div id="notifications"></div>
</ul>
</li>
<li style="text-align: center"><a href="<?= Url::to(['/notification']) ?>">Lihat Semua</a></li>
</ul>
</li>
<li class="dropdown message-notifications-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope-o"></i>
<span class="label label-danger message-notifications-icon-count"></span>
</a>
<ul class="dropdown-menu">
<li class="header">Anda memiliki <span class="message-notifications-header-count">0</span> pesan</li>
<li>
<ul class="menu">
<div id="message-notifications"></div>
</ul>
</li>
<li style="text-align: center"><a href="<?= Url::to(['/message']) ?>">Lihat Semua</a></li>
</ul>
</li> i has defined KEY_ANNOUNCMENT = 'anouncment' and KEY_MESSAGE = 'message' on app\components\Notification. each notification has own counters, elemet "message-notifications" for counter key(field name in table notification) "message" and element "notifications" for other key. |
the layout/header.php like this <?=
NotificationsWidget::widget([
'theme' => NotificationsWidget::THEME_GROWL,
'clientOptions' => [
'location' => 'br',
],
'counters' => [
'.messages-header-count',
'.notifications-header-count',
'.messages-icon-count',
'.notifications-icon-count'
],
'markAllSeenSelector' => '#message-seen-all',
'listSelector' => [
'#messages',
'#notifications'
],
]);
?>
<li class="dropdown notifications-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
<span class="label label-danger notifications-icon-count"></span>
</a>
<ul class="dropdown-menu">
<li class="header">Anda memiliki <span class="notifications-header-count">0</span> notifikasi</li>
<li>
<ul class="menu">
<div id="notifications"></div>
</ul>
</li>
<li style="text-align: center"><a href="<?= Url::to(['/notification']) ?>">Lihat Semua</a></li>
</ul>
</li>
<li class="dropdown notifications-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope-o"></i>
<span class="label label-danger messages-icon-count"></span>
</a>
<ul class="dropdown-menu">
<li class="header">Anda memiliki <span class="messages-header-count">0</span> pesan</li>
<li>
<ul class="menu">
<div id="messages"></div>
</ul>
</li>
<li style="text-align: center"><a href="<?= Url::to(['/message']) ?>">Lihat Semua</a></li>
</ul>
</li> my notification view like this, but i want to each icon notification have own counter, notification and message, so if any message coming the counter of message is increase, not the notification |
I have success create notification, and I want to create other message notification in the same application, is this plugin able to do that?? In separate notification like Facebook notification and Facebook message notification
The text was updated successfully, but these errors were encountered: