Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How to... Banner notifications users can choose to 'hide'
I’d like to add ‘banners’ to my site that have a clickable widget to hide/supress the display of a banner.
Think of some site/system notification or promotion at the top of a website. It will display everytime until a user selects a ‘hide’ option for that particular banner.
I’m thinking of each banner being its own article, and preferrably storing the ‘hidden’ status in a cookie so it doesn’t involve any database storage, and it works anonymously.
Seems like a common pattern, anyone know of Plugins to help support this?
Thanks!
-Mark
Last edited by mericson (2014-12-14 19:53:59)
Offline
Re: How to... Banner notifications users can choose to 'hide'
You don’t need a plugin to do that. Setting the cookie can be done with Javascript on the client side. You can put the banners in a separate section in TXP, display them randomly using article_custom and remember (Javascript) each hide buttom that your visitors click (hint: don’t use separate cookies for each article, but store it all in a single cookie. All you need to store is the article number).
Offline