Jump to:

23483 Posts in 18976 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » How do you determine silverstrpe version and location of mysite/code to add new page templates

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 286 Views
  • cakesy
    Avatar
    Community Member
    4 Posts

    How do you determine silverstrpe version and location of mysite/code to add new page templates Link to this post

    Now I have access to the admin, and it does not say at the bottom of the page when I logged in. I also checked via FTP the silverstripe_version under sapphire contains the tag

    $URL$

    and nothing else.

    I am trying to add new page templates, and not sure where to do it. This is an existing site, with existing page templates, so I am trying to find the folder containing those, but have no idea where it is. There is a folder called mysite/code but it is empty.

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: How do you determine silverstrpe version and location of mysite/code to add new page templates Link to this post

    From the interface it looks like you are running 2.3 or 2.4. Couldn't tell you the exact version though.

    In terms of adding templates, the default tutorials are the best place to start: http://doc.silverstripe.org/framework/en/2.4/tutorials/1-building-a-basic-site

    In summary though, you need to add new page classes to your project folder (by default mysite/code but this can be renamed).

    Then you need to add template files, css, etc to your theme directory in "themes".

    Finally, if this is a live site, I would advise looking into a basic develooment workflow that means you aren't making development changes directly to this site. Instead, try and get a cooy of the site running on a local webserver using something like MAMP or WAMP then when you have finished work, push all your changes to the live site.

    That way if anything breaks, the site isn't offline while you try and fix it .

    Cheers,

    Mo

  • cakesy
    Avatar
    Community Member
    4 Posts

    Re: How do you determine silverstrpe version and location of mysite/code to add new page templates Link to this post

    Thanks Mo.

    For some reason, no code or templates are stored under mysite/code (wonderful name), some templates are stored under the theme /templates, and then for some unknown reason some are stored under commonextensions/templates. Of course, the CMS does not tell you this, I had to copy the entire website to my machine, and then do a search for some snippets of code. I love SS!

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: How do you determine silverstrpe version and location of mysite/code to add new page templates Link to this post

    Hi Cakesy,

    As I said previously, you can rename the mysite directory to whatever you want.

    If you do a file search for Page.php it should point you to the directory you are after.

    Cheers,

    Mo

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