I have created my own page types, NewsHolder and NewsItem. I have created pages so NewsItem is a child of NewsHolder.
But when I use $BreadCrumbs, the parent link in the breadcrumbs does not show.
What am I doing wrong? Do I need to override the getParent() function?
Here is my code:
<?php
class NewsHolder extends Page {
static $db = array(
);
static $has_one = array(
);
static $allowed_children = array("NewsItem");
static $default_child = "NewsItem";
static $can_be_root = false;
}
class NewsHolder_Controller extends Page_Controller {
function init() {
parent::init();
}
}
?>
<?php
class NewsItem extends Page {
static $db = array(
'Date' => 'Date'
);
static $has_one = array(
);
static $allowed_children = "none";
static $default_parent = "news";
static $can_be_root = false;
static $icon = "mysite/images/treeicons/news";
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date'), 'Content');
return $fields;
}
}
class NewsItem_Controller extends Page_Controller {
function init() {
parent::init();
}
}
?>