To build static pages that share the layout of your cakephp's site, you simply add some_file.ctp to your app/views/pages directory, then such page is accessed at www.yoursite.com/pages/some_file. If you want a static page that has nothing to do with cake, simply place it in your cake's webroot directory and it will be accessed at www.yousite.com/someOtherFileNotRelatedToCake.php
There is a core 'pages' controller, which you can override if you need some specific functionality for your static pages. Also it may or may not be desirable for you to have 'pages' int the path of the URL, but that's easily dealt with routes. I like to make my static pages links point to something like www.mysite.com/staticPage.html, then this route rule will properly make the connection to the right controller (hopefully you can see how that works): Router::connect(’/(.*).html’, array(’controller’ => ‘pages’, ‘action’ => ‘display’)); On Sep 13, 9:22 am, 703designs <[EMAIL PROTECTED]> wrote: > The CakePHP docs don't go into very many details about how to use > CakePHP in conjunction with a static website. I'm building a light CRM > app that will be behind my mostly static company site, but I want to > keep these static pages in the Cake system so that templates are > shared and I have access to dynamic capabilities even on static pages. > What's the preferred way to go about this? I see, for example, that > one router is configured to send '/' to pages->default(home), and I > imagine that routing will be involved in what I'm trying to do. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
