Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Two columns

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1859 Views
  • jkt
    Community Member
    1 Post

    Two columns Link to this post


    I've just started experimenting with Silverstripe, and so far I'm very pleased with it.
    I just found the need to have two columns in some pages, and would like to be able to edit the "left" and "right" content just as with any regular (single-column) page content.

    What's the best way to do this?

    Thanks in advance

  • Ingo
    Forum Moderator
    801 Posts

    Re: Two columns Link to this post

    Silverstripe doesn't limit you in this, just put in your content as pleased (e.g. $TagCloud in <div id="Sidebar">, and $Content in <div id="Content">). Use CSS to render those two divs as columns.

    see http://www.positioniseverything.net/articles/pie-maker/pagemaker_form.php
    for a good css-layout-creator.

  • Sean
    Forum Moderator
    921 Posts

    Re: Two columns Link to this post

    You'll want to create new HtmlEditorField(s), which are the same as the standard Content field.



    class Page extends SiteTree {

    static $db = array(
    'RightContent' => 'Text'

    function getCMSFields() {
    $fields = parent::getCMSFields();
    $fields->addFieldToTab('Root.Content.Right', new HtmlEditorField('', 'Right Content'));
    return $fields;



    <div id="RightContent">

    Note that I've added this HtmlEditorField into it's own tab. It's easier to use like this, since it's so large compared to say, a text field.


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.