Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6895057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:51:37+00:00 2026-05-27T06:51:37+00:00

I am new to Cake PHP, in regular PHP I had a index.php and

  • 0

I am new to Cake PHP, in regular PHP I had a index.php and for any bad url tried it would just show home. In Cake, I am switching an old PHP and HTML website to use Cake PHP. I already successfully converted one page :(. Which is good but that page is just about_us. I have not done Home (which would be index.php). So here is my scenario

I created all the controllers and models with no code in it except for this one page that gets a bunch of products,but I have the following questions as I do not understand CakePHP documentation:

1) How can I set up an index.php page and where should I put it and Actually this page needs to grab something from the db too. Should it go under views/pages? (i am not sure)

2) Also how do i retrieve parameters in Cake PHP? i used to have index.php?name=blah and just pull name in. I am not too clear on how the cake website says to do it.. you just add the parameter after a /index/2 for example? How come?.

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:51:38+00:00Added an answer on May 27, 2026 at 6:51 am

    I think cake is quite well-documented. You just didn’t take enough time to read the book.
    1) If you want to create a ‘Home’ page, it doesn’t have to be an ‘index.php’ file.
    (cake has some index.php file to call the bootstrap and dispatch logic and don’t mess with them)
    You can
    – create a view (some .ctp file), put it to /app/View/Pages/ so you can use the url ‘/pages/’ to access the page. Or you can edit /app/Config/route.php file to connect the page to whatever path you want
    – create a normal controller/action/view (if you need to grab something from the db so you should have some models, your controller will call the models and pass data to the view). You can edit /app/Config/route.php to connect the page with your path.

    Cake is convention-over-configuration. But you should understand both the convention and the configuration. Read the book. Learn more about MVC, about cake’s convention and mechanism.

    2) You can retrieve the parameter from controller or view (you should do it in the controller) by using $this->param or $this->passedArgs. There are named ones (e.g: profile/name:john) and unnamed ones (e.g: profile/john).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to Cake PHP and I had a website with regular PHP
I need to add new functionalities into /cake/libs/controller/pages_controller.php but I do not want to
I'm new to cakePHP.I just tried to create a simple form with a text
I am new to cake php and I have a plugin folder in my
Upgraded a (dev) Cake PHP site and had to change database drivers from ADO
I am relatively new to Cake PHP framework and was trying few things in
I am new to Cake PHP and this set up is giving me a
Hi i am new in cake php and can't solve the problem. The problem
I have just upgraded from php 5.1 to 5.3 and had previously been using
I'm new to CakePHP and am just running through the configuration process, but am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.