I tried to install a new theme (local xampp installation) and I followed the steps below but it didn't work. The error message I got is at the end of the comment. Does anybody know what causes the problem?
To install a new theme, follow the steps below:
Step 1. Check the official SilverStripe website for free themes.
Step 2. Once you find a theme you like, download it to your computer.
Step 3. Upload the theme package to the "themes" folder inside your SilverStripe directory.
Step 4. Extract the theme package.
Step 5. To set the new theme, you should edit the _config.php file located in your mysite folder.
The line you should edit is:
SSViewer::set_theme('blackcandy');
If, for example, you wish to install the wine theme from http://www.silverstripe.org/themes, after you upload and extract the theme package to the "themes" folder, you should open mysite/_config.php and change:
SSViewer::set_theme('blackcandy');
to
SSViewer::set_theme('wine');
Error message:
[Warning] file_get_contents() [function.file-get-contents]: Filename cannot be empty
GET /silverstripe/
Line 277 in C:\xampp\htdocs\SilverStripe\sapphire\core\SSViewer.php
Source
268 /**
269 * Used by <% include Identifier %> statements to get the full
270 * unparsed content of a template file.
271 *
272 * @uses getTemplateFile()
273 * @param string $identifier A template name without '.ss' extension or path.
274 * @return string content of template
275 */
276 public static function getTemplateContent($identifier) {
277 return file_get_contents(SSViewer::getTemplateFile($identifier));
278 }
279
280 /**
281 * @ignore
282 */
283 static private $flushed = false;
Trace
file_get_contents()
Line 277 of SSViewer.php
SSViewer::getTemplateContent(Breadcrumbs)
Line 2 of SSViewer.php(396) : runtime-created function
__lambda_func(Array)
preg_replace_callback(/<% include +([A-Za-z0-9_]+) +%>/,lambda_31,<!-- template C:/xampp/htdocs/SilverStripe/themes/wine/templates/Layout/Page.ss --> <div id="Content-Container"> <div id="Breadcrumbs"> <% include Breadcrumbs %> </div> <h2>$Title</h2> $Content $Form $PageComments </div> <div id="Sidebar"> <% if Menu(2) %> <% include SideBar %> <% end_if %> </div> <!-- end template C:/xampp/htdocs/SilverStripe/themes/wine/templates/Layout/Page.ss -->)
Line 396 of SSViewer.php
SSViewer::parseTemplateContent(<div id="Content-Container"> <div id="Breadcrumbs"> <% include Breadcrumbs %> </div> <h2>$Title</h2> $Content $Form $PageComments </div> <div id="Sidebar"> <% if Menu(2) %> <% include SideBar %> <% end_if %> </div> ,C:/xampp/htdocs/SilverStripe/themes/wine/templates/Layout/Page.ss)
Line 321 of SSViewer.php
SSViewer->process(Page_Controller)
Line 346 of SSViewer.php
SSViewer->process(Page_Controller)
Line 175 of Controller.php
Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
Controller->handleRequest(HTTPRequest)
Line 29 of ModelAsController.php
ModelAsController->handleRequest(HTTPRequest)
Line 44 of RootURLController.php
RootURLController->handleRequest(HTTPRequest)
Line 277 of Director.php
Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
Director::direct(/)
Line 118 of main.php