I've built two sets of Holder/Article pages. Within the backend, I cannot access the children of several of them unless I filter by 'page type' (see photo). I've moved the hierarchy of parent pages within the section around as well as even moved them completely outside of the root level page, still, no matter what the order they are placed, only the top TWO show it has children (unless filtered) (see 2nd photo).
I've looked in the DB and all the references are correct and linking to the correct parent files. I'm stumped.
Holder and Article Code here:
<?php
class CaseStudiesHolder extends Page {
private static $allowed_children = array('CaseStudies'
);
public static $db = array(
'Popup' => 'Text',
'IntroShort' => 'HTMLText',
);
public static $has_one = array(
'HeaderImage' => 'Image',
'SectionTitle' => 'Image',
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Images', new UploadField('HeaderImage', 'Header Image'));
$fields->addFieldToTab('Root.Content.Images', new UploadField('SectionTitle', 'Section Title'));
$fields->addFieldToTab("Root.Content.Main", new HTMLEditorField('IntroShort', 'Case Study Short Blurb'));
return $fields;
}
}
class CaseStudiesHolder_Controller extends Page_Controller {
}
<?php
class CaseStudies extends Page {
public static $db = array(
'Popup' => 'Text',
'StudyShort' => 'HTMLText',
'StudyHeadline' => 'HTMLText',
'StudyPhotos' => 'HTMLText',
'StudyCopy' => 'HTMLText',
);
public static $has_one = array(
'Image1' => 'Image',
);
static $has_many = array (
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->removeFieldFromTab("Root.Content.Main", "Content");
$fields->addFieldToTab("Root.Content.Main", new TextField('Popup', 'Case Study Label'));
$fields->addFieldToTab("Root.Content.Main", new HTMLEditorField('StudyShort', 'Case Study Short Blurb'));
$fields->addFieldToTab("Root.Content.Main", new HTMLEditorField('StudyHeadline', 'Case Study Headline'));
$fields->addFieldToTab("Root.Content.Main", new HTMLEditorField('StudyCopy', 'Case Study Copy'));
$fields->addFieldToTab("Root.Content.Main", new HTMLEditorField('StudyPhotos', 'Case Study Photos'));
$fields->addFieldToTab('Root.Content.Image', new UploadField('Image1', 'Header Image'));
return $fields;
}
}
class CaseStudies_Controller extends Page_Controller {
}