Edit Maintenance page to show semi-transparent teaser page

Permalink
Hello,
I'd like to edit my maintenance page so that it shows a copy version of the index.php page but with a semi-transparent overlay that stops the user interacting with site.

I thought I could show index.php using a bit of jquery placed into my maintenance_mode.php. (Not sure if the container div is defined when the page is compiled but when I looked via Inspector it seemed to be there, so I thought this would work. It ran OK, but did not include the contents of the index.php page).

For the semi-transparent div, I guess I can just place all of the maintenance mode page in a new div and use z-index to make sure it overlays the page....???

For example,...
<?php defined('C5_EXECUTE') or die("Access Denied.");?>
<script type="text/javascript">
$(document).ready(function() {  
   $('#container').load('http://mydomain.com/index.php');
})
</script>




Thanks in advance for any ideas

 
mnakalay replied on at Permalink Reply
mnakalay
Hello,
I am sorry to say it like that, but it sounds like a terribly dangerous idea.

See the maintenance page is there for a reason: stop users interacting with the page to not interfere with what's happening in the background.

In your case, anybody with just a passing knowledge of Chrome developer tools and javascript will get rid of your overlay and do whatever they want with your site while in maintenance mode.
PJSAndo replied on at Permalink Reply
Ah! Thanks for that. Maybe there's another way?
PJSAndo replied on at Permalink Reply
So instead, I've edited the maintenance.php added some standard html and placed this in application/views/frontend/

When I place the site in maintenance mode it seems to pick this up and display it ok.
http://gotimetrekkers.com
Is this secure?
rge replied on at Permalink Reply
That should be fine. There is addon that makes it possible to select a page that can be bypassed.
http://www.concrete5.org/marketplace/addons/under-construction...

The advantage is that this page can be setup with block like every other page and you can use your theme styles. I always make a page template uc.php and use this one for my under construction page.
PJSAndo replied on at Permalink Reply
Thanks. I tried using this addon but kept getting errors. Maybe I'll just have to stick with what I've got for the time being.