Skip to content

Commit

Permalink
Fix insertBefore insertAfter for Silverstripe 5
Browse files Browse the repository at this point in the history
  • Loading branch information
purplespider authored Jan 18, 2024
1 parent 7744da6 commit ca0d7b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Extensions/CustomLumberjack.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public function updateCMSFields(FieldList $fields) {
// $fields->insertAfter($tab, 'Main');

if (SiteTree::get()->filter('ParentID',$this->owner->ID)->count()){
$fields->insertBefore($tab, 'Main');
$fields->insertBefore('Main', $tab);
} else {
$fields->insertAfter($tab, 'Main');
$fields->insertAfter('Main', $tab);
}
// END CUSTOMISATION

}
}

}
}

0 comments on commit ca0d7b0

Please sign in to comment.