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:

Customising the CMS /

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

Extending extended Pages

Go to End

4 Posts   1190 Views


Community Member, 26 Posts

29 December 2009 at 4:20am

Edited: 29/12/2009 4:21am

Hi there! Hope anyone can help me with this problem i am stuggling around..

I have created a Page called "Article" which extends "Page". Works great... I have then created another Page called "Category" which extends "Article" (which extends "Page"). Reason is, i want to have all the special properties of "Article" also inside of "Category".

The problem is, i cannot create a Category. I tried to change "$can_be_root", but it didn´t affect anything. After hours ... i replaced changed "Article" to "Page", so the "Category" would not longer extend "Article" but "Page". This worked!!? I can then create a Page of Type "Category" in the Root. But as you know, i do not have the same properties as my Article Page has.

What makes me really diffuse that i have another pagetype called "Event" which i can create and which is also a child of "Article".

This is the hierarchy for example (Please ignore _ since whitespaces are stripped in the forum). Maybe it explains better what i tried to explain above.

- Sitetree
_+- Page
___+- Category (working)
___+- Article
_____+- Event
_____+- Category (not working)

Can anyone help me please? Any answer may help! Thanks!


Forum Moderator, 1391 Posts

30 December 2009 at 2:24am

What do you mean by 'can't create'? Does your Category page appear in the create page dropdown in the the left menubar of the CMS? In that case: what happens when you try to create one? Any error messages?

Is your Event page class-that-works equal to your Category page class-that-doesn't-work in all but the classname?


Community Member, 26 Posts

31 December 2009 at 11:19am

It happens nothing. "Category" appears in the Dropdown, but if I click "Create", just nothing happens.

Both classes are not identic, but both extend Article and Article_Controller....


Forum Moderator, 1391 Posts

1 January 2010 at 12:50am

Something must be wrong in your Category code (since Event works). Did you put Silverstripe in dev mode? Did you try FireBug to look for an error? You could try and build up the Category code anew start with 'empty' classes and go step by step to find where the mishap occurs. I'm sorry I can't be of more help without actually viewing your code, but this should at least get you a bit further...