Under Construction Page

Permalink
Anyone know the best way to create an under construction page? I am building a site live on the sever, I want a under construction page to be homepage until I finish developing the site. Any suggestion would be great. Thanks.

 
ThemeGuru replied on at Permalink Reply
ThemeGuru
Create a page type or create a new theme.

Then open up your home page in edit mode and click design.

Choose either a page type or a new theme.

That is what I do for the under construction pages.
Mnkras replied on at Permalink Reply
Mnkras
or maitnence mode re skinned
andrew replied on at Permalink Best Answer Reply
andrew
A variation on this - I'd probably suggest getting your homepage built out some of the way you want it to look, with the nav, etc... then approve that page. Then, edit the page again and remove all the nav elements and the home page text and replace it with "under construction." Then approve that page. That'll be an under construction page, but then, when you're done, you can just edit the page, go into versions, remove the most recent one and approve the one you made first, with the proper nav and the proper text, which will immediately make the site "live."
freestylemovement replied on at Permalink Reply
freestylemovement
my issue is a bit more complex, the home page itself needs a lot of work in the layout, and is using a lot of content blocks & layouts, where changing page version isn't going to be very productive. do you have any suggestions as to how one could copy/alias the home page, or temporarily assign the home page to another page ( ie a single page "under construction" ) ?

much thanks
jordanlev replied on at Permalink Reply
jordanlev
Can you just cheat and show a static html page to non-logged-in users on the home page?
Something like this:
* Copy the theme's page type template that you're currently using for the home page (default.php, home.php, whatever) to a new file.
* Change the home page's page type to that new copy (so what you do here won't affect other pages in the site).
* Create a fairly static "under construction" html file (well, a portion of an html file), and save it to the theme's directory.
* In the new page type template you created, add this after the opening <body> tag:
<?php
$u = new User();
if ($u->isRegistered()) {
  include($this->getThemePath().'/my_html_file.php');
} else {
//...PUT THE REST OF THE TEMPLATE'S CODE HERE
}
roelvanlierop replied on at Permalink Reply
That's a good way to do it, I stole it from you because I think it's awesome.
You can just remove this to make the page go live.
johndorsay replied on at Permalink Reply
johndorsay
Here's the way that I normally do it. It's not really a c5 way, but it's fairly simple
Create your .htaccess file if you haven't already and define the home directory. I rewrite this line to point the site anywhere else

DirectoryIndex construction.php


Here is the original file using my index.php page

Options +FollowSymlinks
DirectoryIndex index.php
ErrorDocument 404 /index.php
RewriteEngine ON
RewriteBase /
<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>


The issue with this though, is that if someone was to navigate directly to an internal page they would see it and not the under construction page. This will only work from the site root, so really it's great for new sites, but not re-devloped/skinned sites