Jump to:

5554 Posts in 1742 Topics by 1227 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Creating "Content Regions" Easy and fast from admin!

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

Page: 1
Go to End
Author Topic: 1173 Views
  • jorrie
    Community Member
    40 Posts

    Creating "Content Regions" Easy and fast from admin! Link to this post

    I am looking for some point of direction in creating "Content Regions". To clarify what I mean here an example:

    Your hompage has many graphics and 4 columns in the middle filled with text named col1,col2,col3,col4
    Now What I want is to have those 4 columns to show up in the Admin backend when editing the homepage where these 4 columns will be displayed.

    Whats the right way to do this?
    Its okay to have some code in my home.ss file but would be nice if this can also be made possible in the Admin backend for more flexibility. This is as such one of the least features I miss in silverstripe ( Using beta 2.4 version 2 )

  • Kalileo
    Community Member
    127 Posts

    Re: Creating "Content Regions" Easy and fast from admin! Link to this post

    Simply add a HomePage class with the extra fields for the columns, similarly to what is described in the documentation under "Extending a basic site" or so. Then make your template for your homepage, and there you can access the 4 columns with the field names as you defined them in your Homepage class.

    Doing so you can edit the content of the 4 columns in the CMS, each one in its own field.

  • Willr
    Forum Moderator
    5511 Posts

    Re: Creating "Content Regions" Easy and fast from admin! Link to this post

    Also if you need flexible content regions (like you want to mix up the layouts) check out the unreleased promo spots module - http://open.silverstripe.org/browser/modules/promospots/trunk it allows you to define a selection of regional templates then swap out the content in those regions. Its also a ball of fun to play with!.

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.