2014-08-28 52 views

回答

3

您不能以这种方式复制属性。您必须手动重新创建“主页”文档类型下的属性。最好的办法是将该属性添加到主设备(假设您没有此类型的页面),则其他两种文档类型将继承该属性。假设您没有其他文档类型作为主文档类型的直接子项。

所以我们可以看看它是这样的:

“+” =文件类型 “ - ” =房产

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

在上面的例子中,需要对图片地产这两个'首页“和”常用“文档类型。但是,它不一定对主模板的其他孩子有效。因此,我们必须复制该属性,因为我们无法将其添加到主或其他模板也会继承该属性。因此,要解决这个问题(如下面的评论中所讨论的),你应该这样做:

'+' = 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) 
+0

所以我必须在master中再次创建它,然后从Common删除它?这是一个相当复杂的财产...... – alex 2014-08-28 11:50:50

+0

该属性将用于多个页面?如果是,那么您应该为其使用的页面创建父级。因此,如果仅在Home和Common上需要该属性,则应创建具有所需属性的主文档类型的子项,然后使此父模板的“主页”和“常用”模板为子项。 – jezzipin 2014-08-28 11:53:31

+0

好的,谢谢jezzipin! – alex 2014-08-28 12:09:09

相关问题