我正在使用uSiteBuilder,而且我的模型和类的继承性稍微不合适。据我了解,uSiteBuilder只支持类而不支持接口。
我有3种文档类型:
Home (Title, RightColumnWidgets)
StandardContent (Title, RightColumnWidgets, HeaderTitle, HeaderIntro)
Listing (Title, HeaderTitle, HeaderInfo)
一些观察结果:
Home and StandardContent share Title and RightColumnWidgets
Home, StandardContent and Listing all share Title
StandardContent and Listing share Title, HeaderTitle and HeaderIntro
我对模特的尝试是:
模型1
- Content (Title)
- PageHeader (HeaderTitle, HeaderIntro)
- BaseTwoColumn (RightColumnWidgets)
- StandardContent (CORRECT)
- Home (INCORRECT AS Home should have no HeaderTitle or HeaderIntro properties)
- Listing (CORRECT)
模型2
- Content (Title)
- BaseTwoColumn (RightColumnWidgets)
- PageHeader (HeaderTitle, HeaderIntro)
- StandardContent (CORRECT)
- Home (CORRECT)
- BaseOneColumn
- Listing (INCORRECT because HeaderTitle and HeaderIntro are missing, but BaseOneColumn cannot inherit from PageHeader otherwise properties from BaseTwoColumn will also be inherited)
也许我无法解决这个问题,因为模型设计不正确?也许这是uSiteBuilder的限制,因为我不能使用接口?
有人可以提供任何指示或替代解决方案吗?我非常感谢任何帮助。
非常感谢
dotdev