Just as a BTW
if you put an about.ctp in the Pages folder, then the url address just
needs to be www.your-domain.com/pages/about.
This will pull up that content.
To see what is happening, check you routes.php file.
Happy Coding!
--
Our newest site for the community: CakePHP Video
Hi,
I am a newb to Cake. I'm using Ver 2.0.4. I have set up my database,
default layout and created a view for home. All working and looking
pretty.
But (as I am a newb and out of ignorance) I am having difficulty in
creating new views.
Here is what I have done:
I have my
make sure debug level is 2 in app/Config/core.php
than...name for controller file should be AboutsController.php
and views should be like this: app/View/ControllerName/methodname.ctp, so
in your case:
app/View/Abouts/about.ctp
check for this :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
Tilen,
Many thanks for replying.
Yes I have my Config/core.php set to debug level 2.
I have changed my controller file to AboutsController.php and my link as
suggested (I also tried it with just Abouts/about.ctp) and yet still it
doesn't work...
Any other ideas??
Thanks again,
Tim
On
link: yourdomain.com/abouts/about
Controller: Abouts (filename: AboutsController.php), className:
AboutsController
method: about()
View: about (app/View/Abouts/view.ctp)
try with use no models for this controller. inside controller class add
this: public $uses = null;
--
Lep pozdrav, Tilen
Why make another controller to handle static content? Perhaps you playing
with cake to learn and stuff...
Just for me having entire controller to handle about content seems shit odd
- perhaps making a dynamic pages controller is a better idea if you need db
content otherwise use the pages
Many thanks. Will try now in a few minutes and let you know when I'm up :)
On Fri, Dec 16, 2011 at 3:00 PM, Tilen Majerle tilen.maje...@gmail.comwrote:
link: yourdomain.com/abouts/about
Controller: Abouts (filename: AboutsController.php), className:
AboutsController
method: about()
View:
Sam,
Newb - so playing and doing dumb things!!
Thanks,
Tim
On Fri, Dec 16, 2011 at 3:11 PM, Sam Sherlock sam.sherl...@gmail.comwrote:
Why make another controller to handle static content? Perhaps you playing
with cake to learn and stuff...
Just for me having entire controller to handle about
Trying out things is a great way to learn
But using cake to get what you want is good too.
You can do a lot with static pages changing layout etc.
Having dyanimc pages takes some effort true.
Not something to start learning cake with perhaps.
:)
- S
On 16 Dec 2011 23:19, Timothy Oapos;Reilly