#Splash page control for Sitefinity
Show a splash page to give special attention to a campaign or product when a user first visits a website.
The splash control is placed on the home page or a landing page and will automatically redirect to a splash page. The splash page is shown only once to each user. The control allows you to configure the date to to start showing the splash page, when to stop and the page to use as the splash page.
How does it work?
The splash control uses basic HTTP redirect to present the user with the splash page on the first visit. A cookie is set to mark that user has seen the splash page. On the next visit the splash page is not shown if the cookie is found.
How do I set it up?
Upload or copy the
splash.ascx.cs files into your website. The /UserControls folder is a good place to store these kinds of controls.
Setup in Sitefinity 3.7
If you're manually adding the control to your site (i.e. not by uploading through Sitefinity) you need to add a line to your web.config file to enable the control.
<toolboxControls> section and add this line:
<add name="Splash" section="Navigation" url="~/UserControls/Company/Splash.ascx" description="Redirects to a splash page on first visit."/>
Setup in Sitefinity 4.x
Setting up custom controls is a bit tedious in Sitefinity 4.x. The full procedure is described in the developer guide. This is the short version:
- Log in to Sitefinity backend.
- In the main menu in the upper part of the screen, click Administration » Settings.
- Go to the Advanced settings by clicking the Advanced link.
- In the treeview on the left, click Toolboxes » Toolboxes » PageControls » Sections » NavigationControlsSection » Tools.
- Click Create New.
- In the ControlType field, enter ~/UserControls/Splash.ascx.
- In the Name field, enter Splash.
- In the Title field, enter Splash.
- In the Description field, enter something descriptive like Redirects to a splash page on first visit..
- Click Save changes.
Now you are ready to drop the Splash control into a page.
How do I use it?
Create a splash page. This can be any page.
You probably don't want this page to show up in your navigation controls so set Show in navigation? to no.
Drop the splash control into the page that the user normally browses to. This could be the home page or a landing page.
It does not matter where the control is on the page.