Fixes #139 - Broken URL Segment CMS Links

Fixes issue #139 using normann's solution that seems to work perfectly with both long and short links.
This commit is contained in:
James Cocker 2014-06-04 13:12:28 +01:00
parent 2a6c913cd8
commit 38e4bc196d

View File

@ -99,10 +99,8 @@ class SiteTreeSubsites extends DataExtension {
($nested_urls_enabled && $this->owner->ParentID ? $this->owner->Parent()->RelativeLink(true) : null)
);
$url = (strlen($baseLink) > 36 ? "..." .substr($baseLink, -32) : $baseLink);
$urlsegment = $fields->dataFieldByName('URLSegment');
$urlsegment->setURLPrefix($url);
$urlsegment->setURLPrefix($baseLink);
}
}