This guide is intended to get you started on creating your own User Interface by subclassing the LeftAndMain
class.
By the end of this guide, you will have created your first Hello World
interface in the Administration Panel.
This guide requires you to have at least version 3.*
of the framework AND CMS but less than version 4.*
.
If you wish to use this guide, then you will need to swap out any class references with the Fully Quality Class Name (FQCN) as defined in the SS4 upgrade guide.
tl;dr Ignore the following steps and simply create the structure below them
Create a folder with a name of anything you choose in the root directory for your SilverStripe project, for this example we'll be using /helloworld/
and create an empty file within that folder named _config.php
. A _config.php
at the very minimum is required in every module directory for SilverStripe to detect its existence.
Within your new folder, create a sub folder named exactly /code/
and within that folder, for organisation purposes; create another folder called /admin/
Create /helloworld/code/admin/HelloWorldLeftAndMain.php
and place the following code into it for now.
class HelloWorldLeftAndMain extends LeftAndMain {
}
Create the template file that will be used with this class called /helloworld/templates/Includes/HelloWorldLeftAndMain.ss
/framework/
/cms/
/helloworld/
+ _config.php
+ /code/
+ /admin/
+ /HelloWorldLeftAndMain.php
+ /templates/
+ /Includes/
+ /HelloWorldLeftAndMain_Content.ss