Tutorial confusion...

Version 4.1

I’m working through the tutorial at https://www.silverstripe.org/learn/lessons/v4/creating-your-first-project and I’m losing the will to live a bit. Can anybody help?

Firstly, it says that the default project directory is /my-site. I don’t have one of those :frowning: However, towards the end it rambles on about moving /my-site to /app which I do have. Has the default changed or am I missing something?

In the section “What about public?” it tells you (I think - I’m really not sure) not to put some parts of one’s custom theme in the theme/ directory, rather put them in /public because the default installer creates symlinks to the theme/ directory. Well, as far as I can tell the default installer doesn’t and the default install still works. So… I guess I’m very confused about where I should put these directories. Can anybody advise?

I’m assuming that these basic tutorials are out of date… which is a bit unfortunate.

Hej, it s confusing.

Composer puts symlinks to the public folder by default. You can change that behaviour by putting SS_VENDOR_METHOD=“copy” to your env-File and update the installation

I ended up with only keeping the ss-Files of my project-theme in the themes-Folder. All the other stuff, that is needed for the pulic view (js/css/images) goes to the public/resources/themes/project-theme

1 Like

Ok,… correction

I install silverstripe via composer create-project silverstripe/installer
Than I do “composer vendor-expose copy”

  • that should copy the files to public instead of symlinking them…
    unfortunatly I get an error that the a symlinked folder in public/vendor/… can not be found,… overwriten,…
    so I delete the whole vendor-folder under public an than I can do the “composer vendor-expose copy”
1 Like

Sorry - it was Silverstripe 4.2.2

Right… I now see the symlinkks (as you say) in the public/resources/themes/project-theme. These symlink to the appropriate default theme directories.

BUT, the tutorial says to put these directories in the root of the public/ folder. So, which is right? Is the tutorial wrong, is it optional or is it set someplace?

hmm,… yes I think the folder structure is just for better orientation

with the default installtion you have the files of simple-theme in public/resources/themes/ so I put the files of my project-theme to the same folder,…

1 Like