Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit 25f90a5

Browse files
authored
Update README.md
1 parent d12cb64 commit 25f90a5

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,28 @@ Several of these helpers are disabled by default but can be enabled in the confi
2929
- Adds a new "Meta Title" field
3030
- Automatically applied
3131

32-
If you do not add the `HasOnAfterUpdateCMSFieldsExtensionPoint` trait to your base `Page` class then the extension will use an unreliable method of moving the pages. For this reason we suggest adding `use HasOnAfterUpdateCMSFieldsExtensionPoint;` to this class.
32+
If you do not add the `HasOnAfterUpdateCMSFieldsExtensionPoint` trait to your base `Page` class then the extension will use an unreliable method of moving the pages. For this reason we suggest adding `use HasOnAfterUpdateCMSFieldsExtensionPoint;` to this class.
33+
34+
As the trait overrides the constructor you may also set `has_after_update_cms_fields_extension_point` to true which will also enable the new method, however it becomes your responsibility to ensure you have merged the traits functionality into your constructor either manually or using
35+
36+
```php
37+
class Page extends SiteTree {
38+
39+
use HasOnAfterUpdateCMSFieldsExtensionPoint {
40+
HasOnAfterUpdateCMSFieldsExtensionPoint::__construct as __TraitConstruct;
41+
}
42+
43+
public function __construct($record = null, $isSingleton = false, $model = null){
44+
45+
$this->__TraitConstruct($record, $isSingleton, $model);
46+
47+
//your custom things
48+
49+
parent::__construct($record, $isSingleton, $model);
50+
}
51+
52+
}
53+
````
3354

3455
##FooterMenuExtension##
3556
- Adds a new *ShowInFooter* option to the page settings

0 commit comments

Comments
 (0)