Jump to:

4952 Posts in 14256 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Misunderstanding regarding structure

Getting SilverStripe up and running on your computer and on your web server.

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

Page: 1
Go to End
Author Topic: 1774 Views
  • Moose
    Avatar
    Community Member
    26 Posts

    Misunderstanding regarding structure Link to this post

    Hi. I have just installed SS under WAMP. So far so very impressed.

    I'm going through the tutorial and I seem to have some basic misapprehension. My assumption (and the choice I made during the install process) is that the CMS is altering the Tutorial site. However, the template (.ss) file in the tutorial site doesn't seem to correspond to the page I see at http://localhost/silverstripe/. I can even delete the whole tutorial folder without affecting that site. I then assumed i must actually be working on the MySite folder but that doesn't contain any templates.

    Maybe it's just that it's approaching midnight on a Sunday here but I'm super-confused. Any help would be much appreciated!

  • Moose
    Avatar
    Community Member
    26 Posts

    Re: Misunderstanding regarding structure Link to this post

    I just had a look at the MySQL database that was built during installation and it is indeed SS_MySite. Can I copy the /tutorial files into /mysite? I'm still a bit puzzled that the site works although there is no template defined under /mysite.

    I imagine there must be a way to get SS to create a new database for a different site on the same server - being a total neophyte most of my questions are currently probably a bit ridiculous. Could someone maybe just give me a URL for the documentation regarding multiple site implementations?

    Thanks!

  • UncleCheese
    Avatar
    4085 Posts

    Re: Misunderstanding regarding structure Link to this post

    This is super confusing. This is what I always do:

    1) Copy /tutorial/_config.php to /mysite/
    2) Change the global $project to "mysite"
    3) Make sure there's a Page.php in /mysite/code. (I think there is) If not, copy it from tutorial
    4) Create /mysite/templates/Page.ss as <h1>Hello</h1> or whatever you want
    5) Delete the /tutorial/ folder.

    I'm sure this isn't the right way, but it's what I always do. I've never understood the whole "tutorial" concept. I find it annoying.

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Misunderstanding regarding structure Link to this post

    It is quite confusing for people. I undertook some work to make it more straightforward in 2.3...

    ----- In < 2.3 -----
    If you install with 'BlackCandy' option then your code and config file is stored in mysite/ and your theme is set to themes/blackcandy

    If you install with 'Tutorial' option then your code and config file is stored in tutorial/ and your theme is set to blank (as all the tutorial code is stored in tutorial/templates rather then a Theme

    ----- In 2.3+ -----
    No matter what theme you install your code is stored in mysite/ your html is stored in themes/themeyouchoose. Depending on what theme you choose (tutorial / blackcandy) all it does is set this line in your mysite/_config.php file - SSViewer::set_theme('BlackCandy');
    --

    Future plans, in the near future we are planning on removing / rewriting the tutorials on the site as they are over 2 years old and a tad out of date for what they explain. This is why in < 2.3 the tutorial html was not a 'theme' as this was created before we had the functionality of themes. At this time we will be removing the tutorial theme completely.

    This will be replaced with a Recipe Site that you will be able to download the code / templates and the tutorials will be updated with this (screenshots, code statements etcs) and at least time we will tidy up the install procedure.

  • Moose
    Avatar
    Community Member
    26 Posts

    Re: Misunderstanding regarding structure Link to this post

    Thanks for the helpful responses! I'll look up the implications of multi-site installations on a single server when I get there.

  • Pyper
    Avatar
    Community Member
    3 Posts

    Re: Misunderstanding regarding structure Link to this post

    New tutorials would be a godsend, it has been really confusing trying to set this up on a mac

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