Permalink
Browse files

MINOR track virtual pages that link to the current page (from r94700)…

… (from r96768)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102396 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 07ad87a commit 112fe3c1d4b9fadaf51b50354956d2f3c0c1afb6 @chillu chillu committed Apr 12, 2010
Showing with 25 additions and 3 deletions.
  1. +25 −3 core/model/SiteTree.php
View
@@ -1614,7 +1614,7 @@ function getCMSFields() {
'BackLinkTracking',
'SiteTree',
array(
- 'Title' => 'Title'
+ 'Title' => 'Title',
),
'"ChildID" = ' . $this->ID,
'',
@@ -1629,10 +1629,28 @@ function getCMSFields() {
));
}
+ $virtualPagesNote = new LiteralField('BackLinksNote', '<p>' . _t('SiteTree.VIRTUALPAGESLINKING', 'The following virtual pages pull from this page:') . '</p>');
+ $virtualPagesTable = new TableListField(
+ 'VirtualPageTracking',
+ 'SiteTree',
+ array(
+ 'Title' => 'Title',
+ 'AbsoluteLink' => 'URL'
+ ),
+ '"CopyContentFromID" = ' . $this->ID,
+ ''//,
+ // 'LEFT JOIN "SiteTree_LinkTracking" ON "SiteTree"."ID" = "SiteTree_LinkTracking"."SiteTreeID"'
+ );
+ $virtualPagesTable->setFieldFormatting(array(
+ 'Title' => '<a href=\"admin/show/$ID\">$Title</a>'
+ ));
+ $virtualPagesTable->setPermissions(array(
+ 'show',
+ 'export'
+ ));
+
// Lay out the fields
$fields = new FieldSet(
- // Add a field with a bit of metadata for concurrent editing. The fact that we're using
- // non-standard attributes does not really matter, all modern UA's just ignore em.
new TabSet("Root",
$tabContent = new TabSet('Content',
$tabMain = new Tab('Main',
@@ -1698,6 +1716,10 @@ function getCMSFields() {
$tabBacklinks = new Tab('Backlinks',
$backLinksNote,
$backLinksTable
+ ),
+ $tabVirtualPages = new Tab('VirtualPages',
+ $virtualPagesNote,
+ $virtualPagesTable
)
),
$tabAccess = new Tab('Access',

0 comments on commit 112fe3c

Please sign in to comment.