Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

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


Reply


4 Posts   353 Views

Avatar
cakesy

Community Member, 4 Posts

26 February 2014 at 11:02am

Edited: 26/02/2014 11:05am

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.

Avatar
Mo

Community Member, 510 Posts

27 February 2014 at 11:13pm

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

Avatar
cakesy

Community Member, 4 Posts

28 February 2014 at 10:38am

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!

Avatar
Mo

Community Member, 510 Posts

28 February 2014 at 2:08pm

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