5415 Posts in 1651 Topics by 1188 members
|Go to End|
29 March 2010 at 12:27pm
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 )
29 March 2010 at 3:47pm Last edited: 29 March 2010 3:48pm
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.
29 March 2010 at 4:34pm
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!.
|Go to Top|