Hi bigbang
my humble opinion is that silverstripe is not for php beginners but if you are good at copy and paste try this (replace in mysite/page.php) , that's some code I used for multiple paragraph layout (3columns). As I say to my object experienced php developper who works with me on silverstripe, don't forget to flush your database after this (tutorial 1 )!!
<?php
class Page extends SiteTree {
static $db = array(
'TitreContenu2' => 'Text',
'TitreLogo' => 'Text',
'ColonneGauche'=> 'HTMLText',
'ColonneMilieu'=> 'HTMLText',
'ColonneDroite'=> 'HTMLText',
'ParagrapheBas'=> 'HTMLText',
);
static $has_one = array( 'Photo1' => 'Image' );
function getCMSFields() {
$fields = parent::getCMSFields();
//renommer les champs
// $fields->renameField("Content", "SousTitre");
//champs additionnels
$fields->addFieldToTab('Root.Content.Main', new TextField('TitreContenu2', 'Titre de Contenu (2e ligne)'), "MenuTitle");
$fields->addFieldToTab('Root.Content.Entetes', new TextField('TitreLogo', 'Titre de Logo'));
$fields->addFieldToTab('Root.Content.Entetes', new ImageField('Photo1', 'Photo1'));
$fields->addFieldToTab('Root.Content.Paragraphes', new HTMLEditorField('ColonneGauche', 'Colonne de gauche'));
$fields->addFieldToTab('Root.Content.Paragraphes', new HTMLEditorField('ColonneMilieu', 'Colonne du milieu'));
$fields->addFieldToTab('Root.Content.Paragraphes', new HTMLEditorField('ColonneDroite', 'Colonne de droite'));
$fields->addFieldToTab('Root.Content.Paragraphes', new HTMLEditorField('ParagrapheBas', 'Paragraphe de pied de page'));
return $fields;
}
}
class Page_Controller extends ContentController {
function init() {
parent::init();
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("form");
}
}
?>
here you 'll find the associated 3 column layout with tests in case some columns are not visible
<table ><tr>
<td valign="top" width="<% if ColonneDroite %>260<% else %>390<% end_if %>" ><% if ColonneGauche %>
<div id="ColonneGauche" >$ColonneGauche</div>
<% end_if %></td>
<% if ColonneMilieu %>
<td style="border-left:1px solid #0056B5;" width="<% if ColonneDroite %>260<% else %>390<% end_if %>" valign="top">
<div id="ColonneMilieu" >$ColonneMilieu</div></td>
<% end_if %>
</tr></table>
<% if ParagrapheBas %>
<div id="ParagrapheBas"> $ParagrapheBas</div>
<% end_if %>
</td>
<% if ColonneDroite %>
<td valign="top" style="border-left:1px solid #0056B5;" width="245" >
<div id="ColonneDroite">$ColonneDroite</div>
</td>
<% end_if %>
</tr></table>