We currently have a message option on our site that displays any message we add via the CMS to logged in users, but what would be the best way to offer a ‘hide’ option? This way if that particular user doesn’t want to see the message again they could hide it? Any suggestions welcome…
Share
Assuming these are notifications/updates that users need to read, try something like this:
Nnew messages to read.last_read_datecolumn on their user metadata.Now, to decide what messages to show on a given login, just check the
last_read_datecolumn against the date of each message. If the message’s date is in the future relative tolast_read_date, they haven’t seen that message yet.