Yeah, Pigeon, you're right. URLSegments can easily change due to user error in the CMS, and it's bad practice to rely on them. Most of the time this happens, you're trying to control a page that has only one instance and will only ever have one instance. Holder pages are a classic example. If you only have one news section on your site, then NewsHolder is only created once and you may need to access that page from other templates. That's why I usually create a special page class for that.
class SinglePage extends Page
{
public static function instance() { return DataObject::get_one(__CLASS__);
public function canCreate() {return !self::instance() }
}
class NewsHolder extends SinglePage
{
...
}
This does two things.. 1) Guarantees there is only one NewsHolder page can only be represented once in the CMS. Can't have two newsholders simultaneously. and 2) You can easily get the NewsHolder instance with:
NewsHolder::instance();
NewsHolder::instance()->Link();
NewsHolder::instalce()->ID;
etc..