2

I'm looking for a simple way to let users know when new content (comments mainly) has been submitted to nodes they published or commented on and groups they are members of.
Is it possible to groupe that new content within a view ?
The ideal scenario would be to have something that works like stackexchange's inbox in the upper left side of the nav bar with the badge showing the number of new notifications.

I'm using drupal 7 with basic content types and organic groups 7.x-2.9

Any suggestions are welcome.

0

1 Answer 1

2

You could use the Menu Badges module for such notifications, which you can add to any menu item and/or menu tab of your choice. In your case something like "New comments" seems like one, out of a few, appropriate menu item (or menu tab).

Here are some details about it (from its project page):

Provides a method for adding iOS-style badges to menu items. (see screenshot)

enter image description here

Adding Badges to Menus

Once enabled, go to Administration > Structure > Menus, and click "list links" next to the menu containing the target item. Click "edit" next to the item and select the badge to display with the Display Menu Badge select box.

Adding Badges to Tabs

For adding badges to menu tabs, there is a tab under Administration > Structure > Menus called "Tab Menu Badges". Search for the menu router path of the tab you want to alter, then select a badge from the corresponding select box.

Badge Types

The module includes five example badges, and new badges can be created easily with Views. Modules can also supply their own badges with a hook implementation. See the README.txt file for details.

Because of how it integrates with the Views module, by using this integration you basically reduce the solution for any type of notification to something like "Just create an appropriate view of it".

However, there is a small caveat: if you really want the actual number (shown in the red circle) to be accurate, make sure you have some field in your view that will actually correspond to the "new" part of your question. To better explain this: have a look at the "tracker" view (disabled by default), which has the field "Content:Has new content" (or variation: "Content:Has new comments"). This is a perfect field to use if you want to use Menu Badges to get notified whenever there is new content (or variation: new comments).

If you don't have such "new" indicator, then you basically have 2 variations to get around that:

Video tutorials:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.