我的Document Types
部分结构是这样的:
Master
Home
Common
问:如何将属性从复制Common
到,Home
以便可以在主目录中对其进行编辑Content
并拥有该属性的自身版本?
您不能以这种方式复制属性。您将必须手动在“主页”文档类型下重新创建属性。最好的办法是将属性添加到母版中(假设您没有这种类型的页面),然后其他两种文档类型将继承该属性。前提是您没有其他文档类型作为主文档类型的直接子代。
所以我们可以这样看:
'+'=文档类型'-'=属性
+Master
-Title
-Description
+Home
-Title(inherited from Master)
-Description(inherited from Master)
-Gallery (unique to Home document type)
+Common
-Title(inherited from Master)
-Description(inherited from Master)
-Photos (unique to Common document type)
-Gallery (unique to Common document type)
在上面的示例中,“主页”和“公用”文档类型都需要gallery属性。但是,它不一定对主模板的其他子项有效。因此,我们不得不复制属性,因为我们无法将其添加到主数据库中,否则其他模板也将继承该属性。因此,要解决此问题(如下面的评论所述),您应该执行以下操作:
'+' = Document Type
'-' = Property
+Master
-Title (defined in Master)
-Description (defined in Master)
+Other
-Title(inherited from Master)
-Description(inherited from Master)
+Test
-Gallery(defined in Test)
+Home
-Title(inherited from Master)
-Description(inherited from Master)
-Gallery (inherited from Test)
+Common
-Title(inherited from Master)
-Description(inherited from Master)
-Photos (unique to Common document type)
-Gallery (inherited from Test)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句