Orchard CMS - 删除帖子中的标题和元数据(发布日期) [英] Orchard CMS - Remove Title and Metadata(published date) in a post

查看:35
本文介绍了Orchard CMS - 删除帖子中的标题和元数据(发布日期)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


如何删除帖子中的标题和元数据(已发布数据)?这可以在 Placement.info 中完成吗?我尝试创建自定义内容,但看起来不是最佳解决方案.我只是用 CSS 完成的,但我知道这可以用另一种方式完成.


How do I remove the Title and Metadata(published data) in a post? Can this be done in Placement.info? I tried creating a custom content but doesn't look like a best solution. I just done it with CSS but I know this could be done in another way.

推荐答案

您可以编辑当前主题根文件夹中的 Placement.info 文件以不显示标题和发布日期:

You can edit the Placement.info file in your current theme's root folder to not display the title and publish date:

<Placement>
    <Match DisplayType="Detail">
        <Place Parts_Title="-"/>
        <Place Parts_Common_Metadata="-"/>
    </Match>
    <Match DisplayType="Summary">
        <Place Parts_Title="-"/>            
        <Place Parts_Common_Metadata="-"/>
    </Match>
</Placement>

有关更多详细信息,请参阅此帖子:果园:主题剖析

See this post for further details: Orchard: Anatomy of a theme

此外,如果您想知道 Parts_Title 之类的名称从何而来,请参阅 使用 Designer Helper 工具自定义 Orchard(特别是形状追踪).

Also, in case you are wondering where names like Parts_Title come from, see Customizing Orchard using the Designer Helper Tools (specifically shape tracing).

这篇关于Orchard CMS - 删除帖子中的标题和元数据(发布日期)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆