look at APP/config/routes.php, there is a line that reads:
/**
* Here, we are connecting '/' (base path) to controller called 'Pages',
* its action called 'display', and we pass a param to select the view file
* to use (in this case, /app/views/pages/home.ctp)...
*/
Router::connect('/', array('controller' => 'pages', 'action'
=> 'display', 'home'));
Then go to http://book.cakephp.org/view/46/Routes-Configuration
HTH,
- Dardo Sordi.
On Mon, Nov 10, 2008 at 2:24 AM, tpiscotti <[EMAIL PROTECTED]> wrote:
>
> Thanks for the advice! I appreciate it!
>
> - Tony
>
> On Nov 9, 5:14 am, acoustic_overdrive <[EMAIL PROTECTED]>
> wrote:
>> It depends what you want your homepage to represent..
>>
>> If your homepage shows a list of blog posts, for instance, you might
>> set the route for '/' to be '/posts/index', which would use
>> posts_controller.
>>
>> If your homepage is a content-managed page of text and images, you
>> should look at creating a Page model, pages database table, and your
>> own custom pages_controller, based on /cake/libs/controllers/
>> pages_controller.php. You can use the $path variable to interrogate a
>> database table and find the content of a particular page.
>>
>> You shouldn't make a new controller for each page, you should use one
>> pages_controller and use the parameters to differentiate between
>> pages.
>>
>> I'm sure there are tutorials out there for exactly this but can't find
>> any for some reason...
>>
>> On Nov 9, 2:32 am, tpiscotti <[EMAIL PROTECTED]> wrote:
>>
>> > Hello!
>>
>> > I'm an experienced MVC framework developer but am very new to CakePHP
>> > and it's specific features -- so I apologize in advance for the newbie
>> > question. I've done some searching and can't seem to find an answer,
>> > but it seems like such a basic issue that I'm sure the answer is every
>> > obvious and I'm missing something.
>>
>> > My question is:
>>
>> > My default homepage is located in /app/views/pages/home.ctp which is
>> > apparently set in the routing config as the default homepage location
>> > when going to the site root (exwww.mycakesite.com).
>>
>> > Now, how would I set up a controller and model specific to whatever is
>> > set as the default homepage if I want to include database interaction
>> > on the homepage?
>>
>> > NOTE: I've set up other models/controllers/views just fine so far,
>> > it's just the homepage I'm curious about.
>>
>> > Trying to add something like "index_controller.php" or
>> > "home_controller.php" in my /controllers directory doesn't seem to do
>> > anything (when trying to at least trigger an error to see if it
>> > recognizes those naming schemas for the controller and then asks for a
>> > model, etc).
>>
>> > Not sure if this question made any sense. I'll be happy to provide
>> > additional clarification!!
>>
>> > Thank you in advance!
>>
>> > -Tony
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---