Our monthly Virtual Happy Hour is happening this week, Fri Feb 23!

Try our conversational search powered by Generative AI!

Stop inheritance of categories


When we create a new page the categories of the parent page are pre-selected. Is there anyway to stop this behaviour?

Nov 09, 2009 21:05

Really, no one?

Nov 28, 2009 23:59

When you create a new page the same categories that are selected on the parent page are selected on the newly created page? I'm presuming this is a dynamic property that is set to inherit?

Nov 29, 2009 0:11

Exactly, they are preselected in the Categories tab.

Nope, it's the built in categories in Episerver. We are also running Composer, could it be that?

Nov 29, 2009 0:15

I haven't used Composer before, but for EPiServer CMS this is not normal behavior. I would create a clean installation with Composer and see if the same thing occurs there.

Nov 29, 2009 0:53

Yes the same thing occurs with a clean installation. Using CMS 5.2.375.133 and Composer 3.2.5. It seems strange that it should be a Composer issue though since the categories are pre-selected on /edit/EditPanel.aspx.

Nov 29, 2009 12:28

I just tried this on one of our other sites which is running Relate+ (CMS 5.2.375.236) and the same thing happens there. Seems to me like it actually is CMS behaviour.

Nov 29, 2009 12:33

Just tested this on a EPiServer CMS installation, and you're right, the categories get preselected. Never noticed this, very weird. Would be nice to know the reason why this is default behavior.. Anyway I don't think there is an easy way of doing something with the built in PageCategory property, but what you can do is create a new property of type Category selection, and use this instead. This will not preselected the categories on new children pages (tested it this time!).


Nov 29, 2009 13:21

No, I don't understand it either.

How would I go about adding my own? I'm aware of how to add the property to all the templates but how do I make it override the default categories tab?

Nov 29, 2009 13:30

Sorry not that I'm aware of. Only solution I can think of is creating you own and not using PageCategory.

Nov 29, 2009 14:12

Well, I guess I could "hide" the default tab by setting it to "Administrator" level and then hook up to the episerver page_saved event and input my own categories into the default episerver ones. It's not a great solution but it should work.

Nov 29, 2009 15:07

I haven't tried this but you should be able to listen to DataFactory's LoadedDefaultPageData event and remove the categories from the PageCategory property, thereby changing this behaviour and not having to do any other workarounds.

Nov 29, 2009 15:39

Thanks Joel! I had forgot about that event. I've tried it and it seems to work as expected.

Nov 29, 2009 19:49

I posted a solution to this @ http://www.from-rizo.se/2010/01/14/how-to-prevent-episerver-to-inherit-categories-to-childrenpages/

It's not much different from Joels solution, but it can help :)

Jan 14, 2010 15:35
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.