I’m building a learning platform, and I want the user to have a notification bar where they can get a notification that a new learning resource has been added/removed, the notifications should stay there, and if they click on they will be directed to the resource (just like when you have all your notifications On Facebook)
I wanted to know if there is a plugin that does that, or should I create a system myself in the database?
Create a Data type called “Notification”
Create the data fields you want for “Notifications”, with the following as minmum:
Sent_to: List of users
Read: List of users
Link: text
Text: text
Resource: resource
Optional you can add fields like: image, icon, title, type_of_notification etc
Worflow:
When a new resource is created:
“Create a new Notification”
Fill the data fields but leave “Read” empty.
Text could be something like: “You just got access to “Resource_title”. Check it out!”
UI:
Create a gourp in you header with an Notfication-icon and maybe a small dot-icon (for indication of unread notificatons.) Make a conidition on the icons:
When “Search for notifications: Sent_to contains current user + Read doesn´t contain curent user” count>0 — Show this icon/Change color or what you want.
When you click the icon show a list with Notifications for the current user.
When cklicking a notificaton: Link to "Current Notifications “Link”.
Well…just a mind map. You´ll arrange it as you like ofcourse but maybe this helps you in a direction