如何从页面中删除项目?

Mar*_*tin 6 orchardcms

我刚刚下载并安装了Orchard CMS并开始使用它.在区域中创建了一些小部件,并创建了一个博客并自定义了我的顶级菜单.

现在我想对我的欢迎页面进行一些修改.我想删除标题字段和显示创建日期的行,仅显示正文.(这只适用于欢迎页面.其他页面不应受影响)

我该怎么做呢?什么是正确的方法?

roh*_*agg 6

我有同样的愿望删除已公布的日期.在我的情况下,我想从所有页面中删除它们.

一种方法是调整形状的放置......

您需要影响放置的Shape是Parts_Common_Metadata形状.要使其不可见,请将展示位置值设置为"无处".

所以我将它添加到我的主题文件夹中的placement.info文件中:

<Match DisplayType="Detail">
    <Place Parts_Common_Body="Content:before"
           Parts_Tags_ShowTags="Content:after"
           Parts_Comments="Footer"
           Parts_Common_Metadata="Nowhere"/>
</Match>
<Match DisplayType="Summary">
    <Place Parts_Common_Body_Summary="Content"
           Parts_Comments_Count="Nowhere"
           Parts_Tags_ShowTags="Nowhere"
           Parts_Common_Metadata_Summary="Nowhere"
           Fields_Common_Text="Nowhere"/>
</Match>
Run Code Online (Sandbox Code Playgroud)

如果您希望这仅适用于某些内容类型,您可以将上述内容包装在父标记中,例如:

<Match ContentType="Blog"></Match>
Run Code Online (Sandbox Code Playgroud)

我不知道如何将这个仅应用于欢迎页面...


loc*_*man 6

如果有人稍后发现了响应并需要标记以删除主页上的页面标题,那么它是:

<!-- Remove the page title from the homepage -->
<Match Path="~/">
    <Place Parts_Title="-" />
</Match>
Run Code Online (Sandbox Code Playgroud)