November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
You can use normal inheritance with properties with the page class having both its own properties and the ones defined in a base class.
You can also group related properties into blocks that are used as part of the page. It all depends on what you are trying to do.
A base class won't do. I'll need to distribute the page properties into multiple classes if possible. Then I will put 4-6 properties in each class. I'd like for every class to have a tab also.
Then each SPA view will have it's own class (and tab), but the classes all hang on the same EPiServer page which functions as a container.
I'd like not to use blocks for this.
Hi Bo,
It is possible to use partial classes in episerver cms.
For tabs, you can check out this link: http://world.episerver.com/blogs/Per-Bjurstrom/2015/2/typed-tabsgroups/
Tabs are assigned by decorating the propery with the Display attribute and setting its GroupName property. You can't split the class but you could declare the class partial to split the properties into multiple code files if that is any help. And you can of course use custom model classes for your views instead of the page class itself if you want to structure the data in another way.
If you really want to split the properties across multiple classes, you could use multiple pages (of different page types) even if only one of them has a view. This "main" page could have properties pointing to the other pages containing the additional data.
If I have an EPiServer page which contains a lot of properties, can I distribute the properties into subclasses to not have them all in one place?
It's an SPA and no blocks are used.