mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUG Fixing correct URL location to pages
This commit is contained in:
parent
68bc12d74a
commit
d4df26db72
@ -65,7 +65,7 @@ class RelatedPageLink extends DataObject {
|
|||||||
|
|
||||||
// Use cmsEditlink only when moving between different pages in the same subsite.
|
// Use cmsEditlink only when moving between different pages in the same subsite.
|
||||||
$classClause = ($page->SubsiteID == $otherPage->SubsiteID) ? ' class="cmsEditlink"' : '';
|
$classClause = ($page->SubsiteID == $otherPage->SubsiteID) ? ' class="cmsEditlink"' : '';
|
||||||
return '<a href="admin/show/' . $page->ID . "\"$classClause>" . Convert::raw2xml($page->Title) . '</a>';
|
return '<a href="admin/pages/edit/show/' . $page->ID . "\"$classClause>" . Convert::raw2xml($page->Title) . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function AbsoluteLink($master = false) {
|
function AbsoluteLink($master = false) {
|
||||||
|
@ -80,7 +80,7 @@ class SiteTreeSubsitesTest extends SapphireTest {
|
|||||||
$this->assertEquals($importantpage->canEdit(), $link->canEdit());
|
$this->assertEquals($importantpage->canEdit(), $link->canEdit());
|
||||||
$this->assertEquals($importantpage->canDelete(), $link->canDelete());
|
$this->assertEquals($importantpage->canDelete(), $link->canDelete());
|
||||||
$link->AbsoluteLink(true);
|
$link->AbsoluteLink(true);
|
||||||
$this->assertEquals($link->RelatedPageAdminLink(), '<a href="admin/show/' . $contact->ID . '" class="cmsEditlink">Contact Us</a>');
|
$this->assertEquals($link->RelatedPageAdminLink(), '<a href="admin/pages/edit/show/' . $contact->ID . '" class="cmsEditlink">Contact Us</a>');
|
||||||
}
|
}
|
||||||
|
|
||||||
function testCanEditSiteTree() {
|
function testCanEditSiteTree() {
|
||||||
|
Loading…
Reference in New Issue
Block a user