Creating a Basic ‘Page Type’ in the Silvestripe CMS

  1. Create a new file called ‘HomePage.php’ in your ‘mysite/code/ folder. This time HomePage.php:
    <?php
    class HomePage extends Page {
    }
    class HomePage_Controller extends Page_Controller {	
    }
  2.  The first section ‘HomePage’ will define any data we want this page to use.
  3. ‘HomePage_Controller’ defines what we do with this data.
  4. The new page type doesn’t just appear, we have to ‘build’ the database again:
    1.Make sure you have uploaded 'HomePage.php' to your webserver,
    2.Make sure you are logged in to your silverstripe website(mysilverstripesite.com/admin)
    3.Go to mysilverstripesite.com/dev/build
    4.You should see some lines of text, some of them green, and no errors
    5.Go to your admin area: mysilverstripesite.com/admin/ (reload it if it's already open)

Looking for quality SilverStripe Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , , | Posted under SilverStripe CMS | RSS 2.0

Author Spotlight

Teet Bergmann

Teet Bergmann

I'm a freelance web designer from Estonia. Mostly doing sites using Silverstripe, magento, prestashop, wordpress.

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 7 = 13

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>