17488 Posts in 4473 Topics by 1978 members
|Go to End|
12 December 2008 at 6:12am Last edited: 12 December 2008 6:23am
OK I install SilverStripe without any hitches.
During the installation it gave me a choice of themes saying i could change later if i wanted to do the tutorials.
So now i want to do the tutorials, how do i change the theme?
12 December 2008 at 7:11am Last edited: 12 December 2008 7:24am
Hi adam, welcome to silverstripe
themes are changed in the _config.php file which will be found in 'mysite'
you will see a line which reads:
To change the theme you just swap 'blackcandy' with the theme name that you want to use, so you would change it to:
you will also need to change the project as the tutorial uses the tutorial folder to store the code files. Look for the following line at the top of _config.php:
$project = 'mysite';
and change it to
$project = 'tutorial';
13 December 2008 at 9:38am Last edited: 13 December 2008 9:39am
Thanks for that.
I actually reinstalled the whole thing but chose the tutorial option at install time.
I thought if i did the tutorials things would become clearer ...
So i've now done the first two ( and very good they are too) but i'm non the wiser about switching themes yet....
I couldn't understand your answer as after i reinstalled there was no config file inside the mysite folder, so it's just disappeared rather than changed.
Someone mentioned this 4 months ago:
Joe Golike 4
"I'm a web developer myself, and pretty comfortable with PHP code. But after installing, I couldn't figure out how to switch to a different theme. You'd think that would be a pretty important feature that it would be obvious in the UI"
So i guess this is still to be revealed...
15 December 2008 at 5:57am
I think if you install for the tutorials then the _config.php file is in the 'tutorial' folder. Just follow the same instructions and change the appropriate line to your theme name and it should all be good
If you have any more trouble don't hesitate to post, I'll try to be a bit more prompt with my answer next time! hehe
p.s. if you are ready to start a proper site, I'd recomend installing with the blackcandy theme selected so that your config file is in the correct folder.
15 December 2008 at 11:52am
OK I've done all the tutorials now so:
In tutorial 5 why did Projects need a special page of type ProjectHolder to put the Projects in
while Mentor pages could be put directly into a regular page type?
I still don't inderstand the _config.php business. I've now finished the tutorials and am ready to start my own project. So how do i start that without reinstalling the whole thing? (I'm afraid i need it spelling out)
15 December 2008 at 2:32pm Last edited: 15 December 2008 2:36pm
the ProjectHolder is used to manage the content, with out making it complex,
see in the tutorial they have used a NewHolder, this is the same like that one,
Have you work with any CMS system? all use some file to store the information which helps to run the CMS, like database host, db password and stuff.
In SilverStripe the _config.php in the mysite folder stores those directives, which the CMS use to run.
Also in the directory structure, when ever you have a folder, and a _config.php the CMS understand that it is as module, and runs the code. If it is not there it wont run the codes. And these _config.php files in the folders can store the configuration options which relevant to that specific module.
15 December 2008 at 10:56pm
My answer to Question 1:
In the Mentor example there is actually no specific (to a
mentor) content on the Mentor (holder) page (which is just a normal page) so you
can just add normal content; whereas on the ProjectHolder page we put the table
of all the projects (which needs is own template that can access Project
properties), a normal page would just use the Page.ss template so a
ProjectHolder class is created so that it will look for the ProjectHolder.ss template
hence we can have customized content on the ProjectHolder page.
How do i start a new project?
I moved the _config.php folder from the tutorials folder to the mysite folder and i
$project = 'tutorial';
$project = 'mysite';
But no good I get an HTTP 500 error
So then i then i tried a dB flush
But wait a minute, this is still the turorial site!!
I clearly haven't grasped the concepts here.
I though a new folder would = new web site, new objects different pages
How can _config.php in the mysite folder still be using the objects from the tutorials folder???
Is it one web site = 1 installation of SilverStripe , and different project folders (eg mysite, tutorials) are the same pages with different themes?
|Go to Top|