23553 Posts in 19380 Topics by 2892 members
|Go to End|
13 April 2012 at 4:41pm
is there a general way on how to build menues, 404 Pages and use siteconfig on Silverstripe 3 when only usin the Framework Package, without the cms module?
How can I check, if a Route exists or not?
THe Installation sets up the RootURLController. Will this controller be passed, also if a Route is not defined, and how can I check, if a Route is not defined, to redirect to a generic 404 Error Page?
13 April 2012 at 6:43pm Last edited: 13 April 2012 7:02pm
With 3.0 the cms is now an optional module so yes, you can use it on it's own
If you want to setup routes you need to use Director::addRules() (although this will change in 3.0 stable and move to static YAML definitions) to take all your routes and point them to controllers.
The base controller class (Controller) and RequestHandler handle detecting 404 errors so I would investigate those and pick out the bits you want to customize in your own base custom controller for the application..
Here's an example that creates the default pages - https://github.com/silverstripe/silverstripe-cms/blob/master/code/model/SiteTree.php#L1311
23 January 2013 at 1:06am
I am also interested in using SiteConfig but in the framework only version. As SiteConfig is included in the cms version only could you please advise me if/how I can use this without the cms? I have been extending the framework admin to provide a simple system. Using the cms seems overkill for my project.
|Go to Top|