mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUGFIX: Fixed link labelling and behaviour in Related page tab (from r89837)
This commit is contained in:
parent
c961f0244a
commit
17a75b3a1f
@ -60,8 +60,13 @@ class RelatedPageLink extends DataObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function RelatedPageAdminLink() {
|
function RelatedPageAdminLink() {
|
||||||
return '<a href="admin/show/' . $this->RelatedPage()->ID . '" class="externallink" >' . Convert::raw2xml($this->RelatedPage()->Title) . '</a>';
|
return '<a href="admin/show/' . $this->RelatedPage()->ID . '" class="cmsEditlink">' . Convert::raw2xml($this->RelatedPage()->Title) . '</a>';
|
||||||
}
|
}
|
||||||
|
function AbsoluteLink() {
|
||||||
|
$url = $this->RelatedPage()->AbsoluteLink();
|
||||||
|
return '<a href="' . Convert::raw2att($url) .'" class="externallink">' . Convert::raw2xml($url) . '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
function canView($member = null) {
|
function canView($member = null) {
|
||||||
return $this->MasterPage()->canView($member);
|
return $this->MasterPage()->canView($member);
|
||||||
|
@ -178,7 +178,8 @@ class SiteTreeSubsites extends SiteTreeDecorator {
|
|||||||
'RelatedPages',
|
'RelatedPages',
|
||||||
'RelatedPageLink',
|
'RelatedPageLink',
|
||||||
array(
|
array(
|
||||||
'RelatedPageAdminLink' => 'Page'
|
'RelatedPageAdminLink' => 'Page',
|
||||||
|
'AbsoluteLink' => 'URL',
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -189,7 +190,7 @@ class SiteTreeSubsites extends SiteTreeDecorator {
|
|||||||
if($reverse) {
|
if($reverse) {
|
||||||
$text = '<p>In addition, this page is marked as related by the following pages: </p><ul>';
|
$text = '<p>In addition, this page is marked as related by the following pages: </p><ul>';
|
||||||
foreach($reverse as $rpage) {
|
foreach($reverse as $rpage) {
|
||||||
$text .= '<ul><a href="admin/show/' . $rpage->ID . '">' . $rpage->Title . '</a> '.$rpage->AbsoluteLink().'</ul>';
|
$text .= '<ul><a href="admin/show/' . $rpage->ID . '" class="cmsEditlink">' . $rpage->Title . '</a> '.$rpage->AbsoluteLink().'</ul>';
|
||||||
}
|
}
|
||||||
$text .= '</ul>';
|
$text .= '</ul>';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user