Browse files

Fixed inconsistent $listing_page_class static

Added Fields to settings tab on holder
  • Loading branch information...
1 parent cf4508c commit c362ef6dbcdb774b1d526c37873258cd9a0f7328 Aram Balakjian committed Nov 8, 2012
Showing with 9 additions and 9 deletions.
  1. +3 −3 code/DataObjects/DataObjectAsPage.php
  2. +6 −6 code/Pages/DataObjectAsPageHolder.php
View
6 code/DataObjects/DataObjectAsPage.php
@@ -458,9 +458,9 @@ public function hasChangesOnStage()
*/
function getListingPage(){
- $listingClass = $this->stat('listing_class');
+ $listingClass = $this->stat('listing_page_class');
- if(Controller::curr()->ClassName == $this->stat('listing_class'))
+ if(Controller::curr()->ClassName == $listingClass)
{
$listingPage = Controller::curr();
}
@@ -502,7 +502,7 @@ function absoluteLink($appendVal = null)
public function LinkingMode()
{
//Check that we have a controller to work with and that it is a listing page
- if(($controller = Controller::Curr()) && (Controller::Curr()->ClassName == $this->stat('listing_class')))
+ if(($controller = Controller::Curr()) && (Controller::Curr()->ClassName == $this->stat('listing_page_class')))
{
//check that the action is 'show' and that we have an item to work with
if($controller->getAction() == 'show' && $item = $controller->getCurrentItem())
View
12 code/Pages/DataObjectAsPageHolder.php
@@ -16,14 +16,14 @@ class DataObjectAsPageHolder extends Page
'ItemsAsChildren' => false
);
- public function getCMSFields()
+ public function getSettingsFields()
{
- $fields = parent::getCMSFields();
+ $fields = parent::getSettingsFields();
- $fields->addFieldToTab('Root.Behaviour', new HeaderField('DOAP', 'DataObject Item Display'));
- $fields->addFieldToTab('Root.Behaviour', new CheckboxField('Paginate', 'Paginate Items'));
- $fields->addFieldToTab('Root.Behaviour', new NumericField('ItemsPerPage', 'Items per page (if paginated)'));
- $fields->addFieldToTab('Root.Behaviour', new CheckboxField('ItemsAsChildren', 'Show DataObjects as Children of this page'));
+ $fields->addFieldToTab('Root.Settings', new HeaderField('DOAP', 'DataObject Item Display'));
+ $fields->addFieldToTab('Root.Settings', new CheckboxField('Paginate', 'Paginate Items'));
+ $fields->addFieldToTab('Root.Settings', new NumericField('ItemsPerPage', 'Items per page (if paginated)'));
+ $fields->addFieldToTab('Root.Settings', new CheckboxField('ItemsAsChildren', 'Show DataObjects as Children of this page'));
return $fields;
}

0 comments on commit c362ef6

Please sign in to comment.