Hi,
So I have a Page that has extra fields, accessible from SS but not from the Silverstripe REST API, here are the fields and the return from REST API bellow.
private static $db = array(
"Background" => "Varchar(255)",
"Description" => DBHTMLText::class,
"HeaderImage" => "Varchar(255",
"LegalNotice" => DBHTMLText::class,
"ReleaseDate" => "Varchar(255",
"SupportEmail" => "Varchar(255)",
"SupportURL" => "Varchar(255)",
"Website" => "Varchar(255)",
);
private static $has_many = array(
"Movies" => Movies::class,
);
private static $many_many = array(
"NewsArticles" => NewsArticle::class,
);
{
“URLSegment”: “Life”,
“Title”: “Life”,
“MenuTitle”: “Life”,
“Content”: “”,
“MetaDescription”: null,
“Sort”: 1,
“Version”: 10,
“ParentID”: 6,
“ID”: 7,
“VirtualPages”: ,
“Movies”: ,
“Terms”: ,
“RelatedPages”: ,
“NewsArticles”: ,
}
I’m not sure what I’m doing wrong, why those DB fields wont show, but the has_many and many_many at least shows, any help would be appreciated
Thanks