0

So i have made a simple 3 page site in html and JavaScript. Now im wanting to put it in a cakephp framework and am totally lost. The site is a simpe home page, create user screen and onmouseover game thing.

1
  • based on which version of cakephp you want to use the documentation should help. Commented May 28, 2013 at 6:36

2 Answers 2

2

Can i ask you a question? What is the extra value of using a framework on a 3 page based website? And from where are you lost? Already installed Cake?

And if you want to know a little bit more about CakePHP, i really suggest you to read the documentation 2.x and follow the tutorial of making a blog with CakePHP.

It will learn you all the basic things of Cake and you only need like an hour to practice.

Like;

  • How to make a login and registration page, and more

http://book.cakephp.org/2.0/en/tutorials-and-examples.html

Thats my advice to you.

Sign up to request clarification or add additional context in comments.

2 Comments

Well i need a MVC architecture so thought id just nab one with good documentation etc. Cakes installed sweet and im ready to go. Question is where do i start? M, V or C? Ill been looking at and will continue to read through the documentation. Cheers for your reply!
Well i suppose you already know where the letters stands for, how i always start with cakephp ( in the beginning ) with the C (Controller) Because if you start with that one, you can follow the errors as steps, it wil say you need a V (View) with a name like this, you need a M (Model) with a name like this... etc
0

Now you have to understand MVC with that being said a sample controller would be as follows under cakephp 2.x under App/Controller a simple controller:

SamplesController.php with a similar build

class SamplesController extends AppController {
   // Consider these functions pages
   function pageA(){ 

   }
   function pageB(){

   }
   function pageC(){

   }
}

Navigate to App/View create folder Samples. In there create pageA.ctp, pageB.ctp and pageC.ctp . [the ctp files are your pages or proper term view. ]

copy your data of the 3 page site in each ctp file. and your done just navigate to the respected url. http://localhost/cakephpbuild/samples/pageA <= Example only

2 Comments

Thats a great place to start. My final question for now is around a simple model. Im also trying to get picture links working between the pages?
technically, the views should be labelled page_a.ctp, page_b.ctp ... book.cakephp.org/2.0/en/getting-started/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.