Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

HELP I'm seriously Object Confused!!


3 Posts   344 Views


23 August 2013 at 4:54pm Community Member, 122 Posts


After having created a lot of working page types in ss3.1 I now realise that quite a few page types should have the Foundation Orbit slider on them. I therefore cur it out of one working page type and created a new intermediate object OrbitPage.php (which extends Page) and then I extended my pages that need a slider on OrbitPage.

OrbitPage uses another object, OrbitImage, which uses gridfield sorting and a few other things. In OrbitImage I had the following function derived from [url][/url]

function getNextSortID() {
$getDataList = $this->Page()->OrbitImage();

if (!$getDataList || $getDataList->Count() == 0) {
return NULL;
} else {

return $getDataList->first()->SortID + 1

SS3 now baulks on the $this->Page() method which worked when this function was called in reference to a page type one object separated from Page.php. Now I have say, HeroPage extending OrbitPage extending Page, I can't find the right site tree method. $this->OrbitPage() does not work



27 August 2013 at 12:31am Community Member, 189 Posts

Shouldn't it just be "$getDataList = $this->OrbitImage();" ?


27 August 2013 at 4:08pm Community Member, 122 Posts

Well there was a more sever issue anyway in that the twice removed page types took the intermediate name I abandoned this, but thanks for the tip.