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

@ -674,7 +674,12 @@ class DocumentationViewer extends Controller {
else if(is_array($path)) {
$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(),