private function setURLValue()
    {
        if (!$this->URLSegment || ($this->isChanged('Title') && !$this->isChanged('URLSegment'))) {
            if ($this->ID > 0) {
                $Renamed = new Renamed();
                $Renamed->OldLink = $this->URLSegment;
                $Renamed->NewsID = $this->ID;
                $Renamed->write();

                $this->URLSegment = singleton('SiteTree')->generateURLSegment($this->Title);
                if (strpos($this->URLSegment, 'page-') === false) {
                    $URLSegment = $this->URLSegment;
                    if ($this->LookForExistingURLSegment($URLSegment)) {
                        $URLSegment = $this->URLSegment . '-' . $this->ID;
                    }
                    $this->URLSegment = $URLSegment;
                }
            }
        }
    }