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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

HELP I'm seriously Object Confused!!

Go to End

3 Posts   744 Views


Community Member, 135 Posts

23 August 2013 at 4:54pm


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

   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



Community Member, 189 Posts

27 August 2013 at 12:31am

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


Community Member, 135 Posts

27 August 2013 at 4:08pm

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.