17452 Posts in 4473 Topics by 1971 members
|Go to End|
28 June 2008 at 2:26am
I think I'm going to start my site over from scratch, but first I would like to know the proper way to go about it. Don't over think your answer, I'm not looking at something complex, just very basic setup.
I built a very basic site using the blackcandy theme. I wanted to make some minor color changes so I copied the blackcandy theme to a new one (we'll call it newtheme). I make my changes to the css in newtheme and it looks like I'm wanting.
I've tried doing the tutorials, but I'm getting lost at where I should be putting the files. Do they go in the tutorial directory (like in the tutorial) or the mysite directory or in with newtheme. I've had limited success doing the ArticlePage tutorial. It took several tries at putting the ArticlePage and ArticleHolder files in different directories to get the types to show up in the CMS (but they do now, but it doesn't work 100%) The Menu2 doesn't show like in the tutorial. In fact the left side menu doesn't work in any of the tutorial examples I've tried (News and Staff examples). The menu works perfect if I create a page with the default Page type.
I'm willing to start from scratch (I haven't added content) if that's the easiest way to get a properly working site.
I'm just not positive which directories I should be modifying/adding when working on the site.
Any help would be appreciated. Thanks!
28 June 2008 at 11:03am
Once you finish using the tutorial code then your custom PHP page types should go in mysite/code/ rather the tutorial/code/ . To tell SilverStripe to use the code from Mysite rather then the tutorial folder you need to
* Copy tutorial/_config.php to mysite/_config.php
* Open mysite/_config.php and edit the $project = "tutorial" to point to mysite - so $project = "mysite"
* Run db/build?flush=1
Or you can keep using the tutorial/ folder to store the code. Basically that $project var in the _config.php file tells SS where the code is.
All your HTML, CSS and Images for your site should be in themes/newtheme/ as per blackcandy
14 August 2008 at 10:14pm
I have a similar question.
If one should put the custom page types in 'mysite/code' folder, then what should go in 'themes/<theme_name>/code' folder?
Any explanation is greatly appreciated.
14 August 2008 at 10:31pm
Unlike mysite where you can put code or templates etc the themes/yourtheme can only contain folders css/ images/ and templates/ as this is what consists of a 'theme'. No code. Just HTML and CSS and images.
Its a tad confusing at the moment but in conclusion my optimal layout is
--- your theme name /
15 August 2008 at 3:51am
Thanks willr for the prompt reply. Now it makes sense.
The tutorials doesn't clarify this and even the default SilverStripe release have the legacy folders in it.
15 August 2008 at 10:01am
Yes those folders will be removed in the next release to help keep it clear and the tutorials are going to be updated.
|Go to Top|