Jump to:

1366 Posts in 486 Topics by 520 members

Themes

SilverStripe Forums » Themes » Can change a theme

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1689 Views
  • pierre102
    Avatar
    Community Member
    2 Posts

    Can change a theme Link to this post

    I'am new with Sylverstripe ! Good small cms and simple to try... The choice of template is good.. I'am use many CMS in the pass (drupal,Joomla,Ezpublish and more)

    OK now problem. I have a download many model of template for testing but I can change. I make a 3 step simple

    Install

    1.Simply unpack the contents of the zip file into the /themes directory in your SilverStripe installation.
    2.Change to the theme by putting the following line in your ./mysite/_config.php:
    SSViewer::set_theme("themename");3.Visit your homepage, ensuring you flush the cache (append ?flush=1 to the URL).

    I have this message of any template a test

    [Warning] None of these templates can be found: Page.ss, ContentController.ss
    GET /SilverStripe-v2.3.3/

    Line 175 in C:\wamp\www\SilverStripe-v2.3.3\sapphire\core\SSViewer.php
    Source

    166                $this->chosenTemplates['main'] = $this->chosenTemplates[$templateFolder];
    167                unset($this->chosenTemplates[$templateFolder]);
    168             }
    169          }
    170
    171          if(isset($_GET['debug_request'])) Debug::message("Final template selections made: " . var_export($this->chosenTemplates, true));
    172
    173       }
    174
    175       if(!$this->chosenTemplates) user_error("None of these templates can be found: ". implode(".ss, ", $templateList) . ".ss", E_USER_WARNING);
    176
    177       parent::__construct();
    178    }
    179    
    180    /**
    181     * Returns true if at least one of the listed templates exists

    Trace

    * None of these templates can be found: Page.ss, ContentController.ss
    Line 175 of SSViewer.php
    * SSViewer->__construct(Array)
    Line 308 of Controller.php
    * Controller->getViewer(index)
    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

    Suggestion : Sylverstripe is a small, simple cms ! In next release made a admin fonction for selection theme... Good inspiration for a next fonction about manage theme is Wordpress...

    Thank

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: Can change a theme Link to this post

    Make sure your themes name has no spaces and is all lower case, then visit the site with ?flush=1 = site.com?flush=1 to reload the template cache.

  • pierre102
    Avatar
    Community Member
    2 Posts

    Re: Can change a theme Link to this post

    Thank you sir !

    This fonction work well. Sorry for my english, it's not my first language.

    Many thank and good life at Silverstripe !!!

    1689 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.