Closed korthjp17 closed 6 years ago
This can be fixed with something like
use DNADesign\Elemental\Models\ElementalArea;
use SilverStripe\Forms\FieldList;
class ElementPage extends \Page
{
/**
* @var array
*/
private static $has_one = [
'ElementalSidebar' => ElementalArea::class,
];
/**
* @var array
*/
private static $owns = [
'ElementalSidebar'
];
/**
* @return FieldList
*/
public function getCMSFields()
{
$fields = parent::getCMSFields();
// sets the titles for the fields
$fields->dataFieldByName('ElementalSidebar')->setTitle('Sidebar');
$fields->dataFieldByName('ElementalArea')->setTitle('Main');
return $fields;
}
}
The titles for element area fields would have to be added on every page with multiple areas.
Hard to tell which area you are adding an element to unless you guess and test