| @@ 10-20 (lines=11) @@ | ||
| 7 | 'Abbreviations' => 'Abbreviation' |
|
| 8 | ); |
|
| 9 | ||
| 10 | public function getCMSFields() |
|
| 11 | { |
|
| 12 | $fields = parent::getCMSFields(); |
|
| 13 | ||
| 14 | $conf = GridFieldConfig_RecordEditor::create(); |
|
| 15 | $grid = GridField::create('Abbreviations', $this->fieldLabel('Abbreviations'), $this->Abbreviations(), $conf); |
|
| 16 | $tabTitle = $this->fieldLabel('Abbreviations'); |
|
| 17 | $fields->addFieldsToTab('Root.' . $tabTitle, $grid); |
|
| 18 | ||
| 19 | return $fields; |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * If you add <% loop $AdditionalBreadcrumbsAfter %> to your BreadcrumbsTemplate you can |
|
| @@ 11-21 (lines=11) @@ | ||
| 8 | ); |
|
| 9 | ||
| 10 | ||
| 11 | public function getCMSFields() |
|
| 12 | { |
|
| 13 | $fields = parent::getCMSFields(); |
|
| 14 | ||
| 15 | $conf = GridFieldConfig_RecordEditor::create(); |
|
| 16 | $grid = GridField::create('Explanations', $this->fieldLabel('Explanations'), $this->Explanations(), $conf); |
|
| 17 | $tabTitle = $this->fieldLabel('Explanations'); |
|
| 18 | $fields->addFieldsToTab('Root.' . $tabTitle, $grid); |
|
| 19 | ||
| 20 | return $fields; |
|
| 21 | } |
|
| 22 | } |
|
| 23 | ||
| 24 | class ExplanationPage_Controller extends AbbreviationPage_Controller |
|