hey there!
i want to create a new PageType what shows the Title and Content of another Page.
If i have an ArticleHolder what controls its children and now i want to add in this listing a children from another ParentSite.. i'll get an Problem. First i tried to add an Redirector Page between the ArticlePages, but the Redirector Page does not show the Content of the Page where it Redirects to.
Sooo.. i want to create a new PageType with a field like "ShowMeThisPage".
class GetPressePage extends Page {
static $db = array(
'Seitevonpresse' => 'Text'
);
static $has_one = array(
);
static $allowed_children = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new TextField('Seitevonpresse'), 'Seitevonpresse');
return $fields;
}
static $defaults = array(
'ProvideComments' => false
);
}
In SilverStripe there are nice PageControls like
<% control Page(my-page) %>$Title<% end_control %>
and
<% control ChildrenOf(page-url) %>
for example. I can show my "Seitevonpresse" field, when i write "$Seitevonpresse" in my GetPressePage.ss, but this:
<% control Page($Seitevonpresse) %>$Title<% end_control %>
dows not work! :(
I dont realy understand the "Dataobject::get ..." stuff.. so maybe someone can help me to find a good answer?
SalvaStripe