Installing Silverstripe Module/Themes

Last Update : 20/03/2010 9:33am
assets/Uploads/_resampled/SetWidth250-puzzle.png

At the first time when we install Silverstripe, we'll get the standard facilities of silverstripe. With these standard facilities we actually can build a web. But then maybe we want the additional features of the web we like blogs, forums, gallery, or maybe we want to change the look of the web we are to make it more interesting.

On the Silverstripe official site, is already provided additional modules or themes that we can directly use in our web. We can download the modules / themes for free to use. Beside in the official web silverstripe maybe we can also find silverstripe modules / themes in internet through google search engine.

After we downloaded the modules or themes, we can install it on our silverstripe web. The way is easy.

Installing Modules

Usually a module that we downloaded from the internet will be .tar.gz or .zip files. These file can be extracted and can be placed directly on the main directory of silverstripe. We can also change its name with the name we want, whatever the name of the directory later, will not affect the module.

Then for the module installation we must run command to create a database from the module on our silverstripe web. Run the command  db/build/?flush=1 in the URL of your silverstripe in the browser. If the URL is located in http://localhost/sslearn/, then to installing the  module will be http://localhost/sslearn/db/build/?flush=1.

Creating Database

The command db/build/?flush=1 is the command to create a database on silverstripe.

After installing the database of modules, usually the module is able to be used from the admin page. For example, if the module is a blog module, then in the silverstripe admin page there will added two types of new pages named BlogHolder and BlogEntry.

New Page Type

 

Installing Themes

How to install themes on silverstripe actually almost the same as installing a module,  we just extract the themes files  which we have been downloaded, then placed the extract directory the themes directory. We also can change the name of the directory as we like. But the name will take effect later with the themes installation.

After the new theme is located in the themes directory, to use it we have to edit silverstripe configuration file. Configuration file located in  mysite/_config.php. We have to find a part:

SSViewer::set_theme("themename");

Change the themename part same as the new theme directory name. If the new theme directory named sslearn, then the code on the _config.php will be:

SSViewer::set_theme("sslearn");

The next step we must run the command ?flush=1 on our web URLs (http://localhost/sslearn/?flush=1). The command ?flush=1 is used to delete the cache from the old template cache and change into the new template. If the command is not executed, then the themes will not turn into a new themes. The command ?flush=1 also will be used when we want to create our own themes or when we make themes modification.

 

Post your comment

Comments

No one has commented on this page yet.

RSS feed for comments on this page | RSS feed for all comments