...

View Full Version : How to code a splash page?



picklesmom
06-21-2010, 12:18 AM
Hi there,
I have a client who insists on adding a splash page to an existing site. (He wants to show a short slideshow of a few photos and an "enter" button to go to the home page.)

Normally, URLs are directed tothe index.html page when they are loaded. How do I name the splash page to have it be the first thing that pops up when users go to the URL?

Can I keep the actual home page as the index.html page or do I have to call the splash page index.html and then rename the other home.html? Seems there is a way around this, I just can't figure it out.

His site is in html, not php. I am not rebuilding his site, just trying to add this feature for him. Can anyone give me some guidance as to how I can achieve this?

Thanks in advance!

abduraooft
06-21-2010, 08:35 AM
In apache, you could write a DirectoryIndex directive to tell the server about the default index page. See http://www.htaccesselite.com/directoryindex-and-indexes-example-vt39.html

arnyinc
06-21-2010, 06:03 PM
The problem with actually renaming the page is that you would need to update every link that goes to that page. So if someone goes to http://www.example.com right now, it would take them to the current http://www.example.com/index.html. If you rename that page to home.html, it would cause issues once someone goes into the website. Suppose they go to a "Contacts" page, then they click a link to return home. It would link them to http://www.example.com/ or http://www.example.com/index.html (which would redisplay the slideshow for them).

If I was doing this, I wouldn't create a new page. I would use a "lightbox" (see http://www.justinbarkhuff.com/lab/lightbox_slideshow/ for one of many examples). Then you could just embed this into the existing index.html and you wouldn't need a new page.

I would recommend a javascript cookie to make sure the slideshow only shows for the user once per session (i.e. don't show every time they go to the homepage).

picklesmom
06-22-2010, 06:04 PM
Thank you both very much for your responses. I will take these options into consideration for my client.

craftygeek
06-23-2010, 08:55 AM
If its a small site, changing links isn't really an issue.

I've done this for a couple of clients before with reasonably small sites...I rename the existing home page to index2.php & the new splash page becomes index.php.

I use a php include for menus so I change the link in one place & its done across the whole site...makes life a lot easier for change like this.

picklesmom
06-23-2010, 03:50 PM
If its a small site, changing links isn't really an issue.

I've done this for a couple of clients before with reasonably small sites...I rename the existing home page to index2.php & the new splash page becomes index.php.

I use a php include for menus so I change the link in one place & its done across the whole site...makes life a lot easier for change like this.

haha you're reading my mind. This is essentially what I did- index for splash and index2 for home. The client only has three other internal pages so redoing the links was a breeze. This was my logical "plan b" approach and it works perfectly.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum