MODX Community

Under Construction / Maintenance page

Hi,

I’m new to MODX and I’ve been assigned to make updates to the templates and I need to put the site on maintenance mode and add an “under construction / maintenance” splash page but I haven’t seen any documentation for this.

Basically what I need is for me/admin to be able to see what I’m doing but the normal user should just see the splash page.

I would appreciate some guidance.

Here’s one possible solution:

  1. Set up a new ‘maintenance’ resource
  2. Make it look nice :wink:
  3. Go to context settings :link:
  4. Change site_start from whatever your original start id is (usually it’s 1 if that is your home page)

Once that is set, if you go to your base website url, it will direct you to the maintenance page. But if you view any other resource using the manager, it will take you to that resource.

One problem with this solution is that it doesn’t stop people from having access to pages they know the URL to. I think you can do this with user permissions, or by taking advantage of this

Use an output filter and a snippet to redirect them to your home page? Maybe. But I don’t know if that is the best option. Hopefully someone else has a better suggestion haha

hope the first one gives you a starting place though

Edit: citing my sources

1 Like

@frankie_tech’s solution is the right solution, changing the sitestart to the ID of your holding page. If you don’t want people to view the other resources on your website while you develop you can keep everything unpublished.

If you’re using PdoTools (which I highly recommend) you can check your navigational menus are working using &previewUnpublished=`1 and add &showUnpublished=`1` to your pdoResources snippet. (Just make sure to set to 0 when you publish the sit).

1 Like