Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Build my site in a folder other than "tutorial" ?

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: 2989 Views
  • amdayton
    Avatar
    Community Member
    8 Posts

    Build my site in a folder other than "tutorial" ? Link to this post

    I'm definitely new at this, but I've been trying to find an answer to this all afternoon with no luck. All of the tutorials are building a site in the directory "tutorial." It doesn't seem obvious to me how one sets up their site in a different directory, like "appname." For production it doesn't seem to make sense to build my app in the "tutorial" folder. What am I not getting here?

    Thanks.

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Build my site in a folder other than "tutorial" ? Link to this post

    Ah, you can put it any subfolder under your silverstripe root. Just make sure you have the _config.php file there and you're good to go.

    "What the heck?" you might say...

    Any subfolder of your silverstripe root can define page types, have templates, etc. This is how modules work. When you run /build/db, SilverStripe finds those folders with _config.php files and adds those datamodels to your site.

    So you could build the basic functionality of your site into a folder called '/mysite/'. You could also put the code for a forum in your /mysite/ directory too - OR you could put it into a new /forum/ folder - SilverStripe doesn't care!

    Hope this helps!

  • mejobloggs
    Avatar
    Community Member
    11 Posts

    Re: Build my site in a folder other than "tutorial" ? Link to this post

    I was just about to ask this question too. It's a bit silly that the SilverStripe tutorial only sets you up for working in the tutorial folder. Imo the tutorial folder should be able to be deleted at any time without losing anything important, yet the tutorials get you to put everything in it

  • simon_w
    Avatar
    Forum Moderator
    473 Posts

    Re: Build my site in a folder other than "tutorial" ? Link to this post

    In 2.3, everything is done in mysite/, with the tutorial just being a theme, thus you can delete it with ease.

    2989 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.