Score:-1

One time … landing page?

ve flag

I’m building a Drupal 9 site and would like to have a one-time landing page that any visitor sees with various images when they first visit, then if they click on any image, or anywhere on the page for that matter, they go to the site’s home page, which stays as the home page for the remainder of that session. It’s sort of a like getting a splash when you first visit home, only I don’t want a modal, I’d like an empty page save for the images. I’m having a heck of a time figuring out how to do this. Does anyone smarter than me have any ideas? I don’t even know what to call this one-time landing page.

Kevin avatar
in flag
Off the top of my head it sounds like something you would have to solve with cookie(s) and an EventSubscriber.
Score:1
cn flag

Splash Redirect claims to do this with a cookie:

The main difference between this module and ones like Splashify is that Splash Redirect sets a cookie to "remember" whether or not a user has seen your splash page.

This module is only available for Drupal 8 but you can either port it to Drupal 9 yourself or use the code as a reference.

P.S. If you're having trouble googling for this, it's probably because you want a splash page, not a landing page.

A landing page usually refers to:

a standalone web page, created specifically for a marketing or advertising campaign. It’s where a visitor “lands” after they click on a link in an email, or ads from Google, Bing, YouTube, Facebook, Instagram, Twitter, or similar places on the web.

You would want a landing page if you were creating several different landing pages for various ad campaigns and sending different groups of users to each one.

In your case, though, it sounds like you want all visitors who come to the site from anywhere to go a single page, and then get sent to the home page, which is probably more commonly called a splash page.

druque avatar
ve flag
Many thanks Patrick. I guess I called it a landing page because I’ve always associated splash pages with modals, plus I still have a regular home page. Anyway, Splash Redirect seems like it will do what I need. I’ll report back on my success later in case anyone else is interested.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.