FIX: remove version from the breadcrumb url for the stable version

Same as in the menu links. fixes multiple urls for the same content
This commit is contained in:
martimiz 2012-11-08 16:27:48 +01:00 committed by Will Rossiter
parent 62dd4e92f7
commit 027b63ea0b

View File

@ -675,6 +675,11 @@ class DocumentationViewer extends Controller {
$action = implode('/', $path);
}
// check for stable version: if so, remove version from link
// (see DocumentationEntity->getRelativeLink() )
$objEntity = $this->getEntity();
if ($objEntity && $objEntity->getStableVersion() == $version) $version = '';
$link = Controller::join_links(
Director::absoluteBaseURL(),
self::get_link_base(),