17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1123 Views |
-
New page trouble:(

30 July 2008 at 4:36pm
Hi folks
SilverStripe is my first CMS and I'm pretty new to php too, so forgive me if I'm doing something really obviously wrong!
I've been following the tutorials, but when I try to make a new page in /tutorial/code/ following the instructions (eg. HomePage.php or ArticlePage.php) it just won'tshow up in my CMS even after flushing it.
Anyone know what I could be doing wrong?
Thanks!!
-
Re: New page trouble:(

31 July 2008 at 9:04am
Thats http://localhost:3000/db/build?flush=1 ?
Yes I've done that. Still not showing up in the behaviour tab. -
Re: New page trouble:(

31 July 2008 at 9:33am Last edited: 31 July 2008 9:34am
Make sure:
The file name is exactly the same name as the class name.
e.g. HomePage.php should have this class structure:
class HomePage extends Page {
}
class HomePage_Controller extends Page_Controller {
}
Also, the file MUST be in the code directory of the project. If it isn't, it may not be picked up by the build script.
Sean
-
Re: New page trouble:(

31 July 2008 at 9:58am
Ok, the files are in the C:\wamp\www\lighttpd\htdocs\tutorial\code directory, but the CMS itself seems to be in C:\wamp\www\lighttpd\sbin. Is that where the problem is?
The file name and class name are exactly the same.
Thank you for your help! -
Re: New page trouble:(

31 July 2008 at 10:19am
Yes, that would be a problem. They need to be in the same location, i.e. the CMS should be in the same root level directory as where your code is.
e.g.
htdocs/cms
htdocs/sapphire
htdocs/jsparty
htdocs/tutorial
htdocs/tutorial/code
htdocs/.htaccess -
Re: New page trouble:(

31 July 2008 at 10:26am
Yeah I thought that was a bit strange now that I've discovered that. Ok will move things around and see if I can get it going.
I keep reassuring myself that I thought HTML and CSS were tricky when I started learning them, so I'll get there with this too!
| 1123 Views | ||
|
Page:
1
|
Go to Top |



