Home / Software / cakePHP – Quick and Simple Maintenance page

cakePHP – Quick and Simple Maintenance page

How to setup a maintenance page in cakePHP – this is one of the ways:

Create new model:
app/models/offline.php

Create new controller:
app/controllers/offlines_controller.php

layout = ''; //empty layout - an example
		//$this->layout = 'header_only'; // I use my header-only layout which shows page header on the top
	}
}
?>

Create new view:
app/views/offlines/index.ctp

We are currently taking care of your data. Please check back later.

and add following line on the top of
app/config/routes.php

//MAINTENANCE - uncomment when maintenance
Router::connect('*', array('controller' => 'offlines', 'action' => 'index'));

When this line is left uncommented then all requests are redirected to the app/views/offlines/index.ctp page.

Hope this helps.

Please LIKE, Share, ReTweet. Thank you.


Learn Advanced PCB Layout ONLINE

You will learn how to do Advanced PCB Layout (DDR3, PCIE, SATA, Ethernet, etc.).

How to register for this online course?

Step 1: Register & Login at FEDEVEL Academy website – Click here
Step 2: Select your course (you will need to be logged in) – Click here

Find out more about this course in this short introduction video


Learn Advanced Hardware Design ONLINE
Starting next week. Don’t miss. Register here >>
Special offer THIS WEEK ONLY: Sign up for Advanced Hardware Design Course and Get FREE Altium Essentials Online Course Register here >>

This course will show you how you can design boards more effectively and produce professional results. It provides you tips and tricks to help you to design boards that work the first time.

The course is practically based and will teach you everything by actually doing it. Anyone who is interested can work on his/her own project during the course. By the end of the course you will have learnt how to create professional manufacturing output which you can then use to build your own board.

How to register for this online course?

Step 1: Register & Login at FEDEVEL Academy website – Click here
Step 2: Select your course (you will need to be logged in) – Click here

Find out more about this course in this short (2 minutes) introduction video

Check Also

Starting with TI EZSDK - fi

Starting with TI EZSDK C6A816x – Video Tutorial

Video tutorial for C6A816x / DM816x. Explains How to Compile u-Boot, Compile Kernel, Prepare File system, Create booting SD Card, Flash u-Boot via JTAG

  • dieg58

    Hello, i follow the procedure but nothing happend.

    ‘ve you an idea of what can be wrong, I’m on the latest version of cakephp. I’ve deleted the cache of chrome. I’ve commented all other router and my site still visible…

    I know that it’s very difficult to help with these poor informations, but I don’t know what I can say more.

    Thank you in advance.
    Diego

    ps : sorry for my english, but I’m french :)

    • http://www.fedevel.com Robert Feranec

      Hi Diego, I really don’t know what can be wrong. I used this example some time ago on my site and it worked perfectly. I am not sure about CakePHP version.

  • http://callumburton.webnode.com/ GradyRaymond

    Your coding of  Quick and Simple Maintenance page will surely help to PHP Developer.That was most helpful to them.