Try our conversational search powered by Generative AI!

Stop inheritance of categories

Vote:
 

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

#34573
Nov 09, 2009 21:05
Vote:
 

Really, no one?

#35099
Nov 28, 2009 23:59
Vote:
 

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?

#35101
Nov 29, 2009 0:11
Vote:
 

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?

#35102
Nov 29, 2009 0:15
Vote:
 

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.

#35103
Nov 29, 2009 0:53
Vote:
 

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.

#35107
Nov 29, 2009 12:28
Vote:
 

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.

#35108
Nov 29, 2009 12:33
Vote:
 

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!).

 

#35109
Nov 29, 2009 13:21
Vote:
 

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?

#35110
Nov 29, 2009 13:30
Vote:
 

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

#35111
Nov 29, 2009 14:12
Vote:
 

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.

#35112
Nov 29, 2009 15:07
Vote:
 

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.

#35113
Nov 29, 2009 15:39
Vote:
 

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

#35116
Nov 29, 2009 19:49
Vote:
 

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 :)

#36116
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.