Jump to:

5539 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Content Block Order?

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

Page: 1
Go to End
Author Topic: 1082 Views
  • shakingpaper
    Community Member
    15 Posts

    Content Block Order? Link to this post

    Hi there,

    I have set up a page type with multiple content blocks using the below code:


    class MultiPage extends Page {

    static $db = array(
    'RowLeft' => 'HTMLText',
    'RowRight' => 'HTMLText',
    'RowRightTwo' => 'HTMLText'

    static $has_one = array(

    * Additional Content Blocks
    function getCMSFields() {
    $fields = parent::getCMSFields();

    $fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('RowLeft'), 'Content');
    $fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('RowRight'), 'Content');
    $fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('RowRightTwo'), 'Content');

    return $fields;


    class MultiPage_Controller extends Page_Controller {



    It works great but I am wondering if there is a way to control the order of how the blocks show up in the page editor. The default 'Content' area gets pushed to the bottom and I would like it to show up in the order it is shown on the page (the additional blocks show up underneath the default content area)

    I hope this makes sense - any help would be much appreciated

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.