Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-03-10 21:58:23

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 3,754
Website

Session-based conditional content?

Just curious here, not a firm need.

But imagine you have a prominant about blurb or notice or something near top of the home page for first arrival benefit, then the visitor goes to another section to read an article, and miraculously happens to return to the home page again. This time you don’t want to put the notice or blurb in their face again needlessly.

Has there ever been a plugin like that? I guess it would have to be something session based, so when they finally left the site and ever came back the notice is there again.

Anything like that exist? Too difficult? Impractical?

Offline

#2 2018-03-11 06:46:16

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,617
Website

Re: Session-based conditional content?

There was some code by Jukka (if I remember correctly) which had to do with the EU cookie law. As the script appears only once and when you click OK it does not appear any more, I guess that it should be able to be adapted to your needs. The problem is that I can not find it now.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#3 2018-03-11 11:35:55

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 2,916
Website

Re: Session-based conditional content?

Yes, setting a cookie with with chs_cookie or oui_cookie when it is displayed and then checking whether that cookie exists before redisplaying it is the way to go.


TXP Builders – finely-crafted code, design and txp

Offline

#4 2018-03-11 15:16:46

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 3,754
Website

Re: Session-based conditional content?

Unfortunately, the EU law of having to warn visitors about setting a cookie, simply used to hide an about blurb while they visit, defeats the UX gain of negotiating the blurb.

So, that won’t be happening, in fact.

Offline

#5 2018-03-11 17:34:11

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 2,916
Website

Re: Session-based conditional content?

Two other ideas:

  • some kind of welcome page, a bit like a cover, that you see on first load but that the navigation never leads back to, or…
  • an element that is only shown to external referrers (or no referrer) but not to referrers from inside your site. People would see it on the first visit but for as long as they continue to surf within your site it wouldn’t reappear.

TXP Builders – finely-crafted code, design and txp

Offline

#6 2018-03-11 17:57:38

etc
Developer
Registered: 2010-11-11
Posts: 2,675
Website

Re: Session-based conditional content?

or check IP if logging is on, though this is not very reliable.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#7 2018-03-11 18:46:59

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 3,754
Website

Re: Session-based conditional content?

jakob wrote #309906:

an element that is only shown to external referrers (or no referrer) but not to referrers from inside your site. People would see it on the first visit but for as long as they continue to surf within your site it wouldn’t reappear.

That one sounds exactly like what I had in mind, conceptually speaking.

The blurb is already in a div with selector. But I have never negotiated content by referer before. I’ll have to do some research.

Thanks for the tip.

Offline

Board footer

Powered by FluxBB