I remember when I started for the first time... I actually didn't
create those files in the App/views of app/webroot... The best way I
think to start is to copy the directories CAKE/lib/views/pages and
CAKE/lib/views/layouts into the APP/views directory...

Basicly, when Cake can't find the file under the APP directory, it'll
try to get the one under the CAKE/LIB directory (As a failsave kinda)
When you have copied those directories, the page should still look
about the same as before, only with the basic files now under the
right directory. From now on, do all edits in the APP/views directory.
Also, when you want to make edits to files like the pages_controller
or app_controller at a later stage, copy the one from the LIB and put
it under APP at the right place.

I started by tweaking the layout file a little to see what happened.
Before any database stuff, see the layout-file "default.ctp" as the
page in which everything get's shown. It'll basically be the main file
with from top to bottom the standard <HEAD> and <BODY> and <HTML>
tags, and stuff that tells cake where for instance menu's and views
are to be shown, but can also have like images etc... Anything static
that must be shown all the time.

The home.ctp under app/views/pages is now the one that gets shown as
the start-page. Change the text there and see what happens when you
reload your webpage. After that I did the blog-tutorial on the cake-
website and from then on I was hooked...

Hopefully this story made any sense :D




On 12 okt, 17:58, Sam Sherlock <[email protected]> wrote:
> Have you read run through the cakephp blog tutorial (I went though the blog
> tutorial a few times getting started trying variations - its a great learn
> by example and swift to -- well written I might add)  for sure as your new
> to it check out the irc channel too & and the videos 
> tutorialshttp://book.cakephp.org/view/4/Beginning-With-CakePHPhttp://cakephp.org/screencasts
>
> you have an application controller and also specific controllers for example
> posts
>
> pages controller is set up by default and you can make static pages by fore
> instance creating a new .ctp in the app/views/pages/ directory (and make
> subdirs with that too - ideal for simple non db content)  once you get
> initiated into it its very straight forward and intuitive (not like other
> frameworks which took me ages to not be able to fully cfg)
>
> hth - S
>
> 2009/10/12 bobslf <[email protected]>
>
>
>
> > A fresh installation of cakephp shows this on the front page:
>
> > Editing this Page
> > To change the content of this page, create: APP/views/pages/home.ctp.
> > To change its layout, create: APP/views/layouts/default.ctp.
> > You can also add some CSS styles for your pages at: APP/webroot/css.
>
> > Is this how everyone does it? I've also read about adding app/
> > controllers/pages_controller.php.
> > When would you need to do that? Any other standard things that people
> > do?
>
> > thanks,
> > Bob
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to