diff --git a/src/Extension/FluentSiteTreeExtension.php b/src/Extension/FluentSiteTreeExtension.php index 9620794f..2d627e8a 100644 --- a/src/Extension/FluentSiteTreeExtension.php +++ b/src/Extension/FluentSiteTreeExtension.php @@ -95,6 +95,10 @@ public function getLinkToXDefault() */ public function updateRelativeLink(&$base, &$action) { + + if ($this->owner->hasMethod('disablePrependLocaleURLSegmentToLink') && $this->owner->disablePrependLocaleURLSegmentToLink()) { + return; + } // Don't inject locale to subpages if ($this->owner->ParentID && SiteTree::config()->get('nested_urls')) { return;