You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/01_basic_usage.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,15 +131,16 @@ class MyModel extends DataObject
131
131
132
132
## Unversioned links
133
133
134
-
The `Link` model has the [`Versioned`](api:SilverStripe\Versioned\Versioned) extension applied to it by default. If you wish for links to not be versioned, then remove the extension from the `Link` model in the project's `app/_config.php` file.
134
+
The `Link` model has the [`Versioned`](api:SilverStripe\Versioned\Versioned) extension applied to it by default. If you wish for links to not be versioned, then remove the extension from the `Link` model via configuration `yaml` file.
135
135
136
-
```php
137
-
// app/_config.php
138
-
139
-
use SilverStripe\LinkField\Models\Link;
140
-
use SilverStripe\Versioned\Versioned;
141
-
142
-
Link::remove_extension(Versioned::class);
136
+
```yaml
137
+
---
138
+
Name: app-link-customization
139
+
---
140
+
SilverStripe\LinkField\Models\Link:
141
+
extensions:
142
+
# This project uses non-versioned links
143
+
versioned: null
143
144
```
144
145
145
146
If you do this, you don't need to apply the `$owns` configuration described in [basic usage](#basic-usage) above.
0 commit comments