Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi guys,

I have one of my weird requests :P

I'm on developing after a long period of silence (as you have noticed ....) so I have a thing to ask that it would save my life.

Basically I created a dropdown for the client to decide when the website is under construction or not. This dropdown masquerades the home or a coming-soon page depending on the choice. Now the problem is that even if the home is not on the root anymore, if the user types the address is still viewable and so are all the other pages. Now is there a way to automatically unpublish all the page depending on a dropdown? they are just 5 or 6 so I can do it manually but i would love to automatize the process. In the meanwhile I'm trying to unpublish the "list" template of a cloned pages template. Any idea on how to do it?

Thanks heaps guys!!!
Hi Emanuele,

Wouldn't it be much cleaner and easier to simply use the config.php for making a site offline?
// 0.
// Set the follwing to 1 to put your site in maintenance mode.
// In this mode only admins will be able to access the site while the visitors will be
// shown the 'Site undergoing maintenance' message.
define( 'K_SITE_OFFLINE', 0 );

Additionally, if you place a template named '503.php' in the root folder of your site (can be a simple PHP file or a Couch managed template), Couch will automatically serve its contents when the site is down for maintenance.

Please let me know if this solves your problem.
Thanks.
2 posts Page 1 of 1
cron