Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » New page trouble:(

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1217 Views
  • chuckwood
    Avatar
    Community Member
    6 Posts

    New page trouble:( Link to this post

    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!!

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: New page trouble:( Link to this post

    have you rebuilt the database?

  • chuckwood
    Avatar
    Community Member
    6 Posts

    Re: New page trouble:( Link to this post

    Thats http://localhost:3000/db/build?flush=1 ?
    Yes I've done that. Still not showing up in the behaviour tab.

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: New page trouble:( Link to this post

    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

  • chuckwood
    Avatar
    Community Member
    6 Posts

    Re: New page trouble:( Link to this post

    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!

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: New page trouble:( Link to this post

    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

  • chuckwood
    Avatar
    Community Member
    6 Posts

    Re: New page trouble:( Link to this post

    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!

    1217 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.