我可以让Orchard在博客列表中显示整个博客帖子吗? [英] Can I make Orchard show the entirety of a blog post in the blog list?

查看:121
本文介绍了我可以让Orchard在博客列表中显示整个博客帖子吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚设置了Orchard,注意到预览小部件只显示标准的更多链接的前几个句子。有没有办法重写此功能,而不创建自定义窗口小部件?我想让Orchard显示我最近的五个帖子的全部。

I just set up Orchard and noticed that the preview widget only shows the first couple sentences with the standard "more" link. Is there a way to override this functionality without creating a custom widget? I would like Orchard to show the entirety of my latest five posts.

推荐答案

当然,只是把这个Parts.Common.Body。 Summary.cshtml在您的主题的views目录中:

Sure, just put this Parts.Common.Body.Summary.cshtml in the views directory of your theme:

@{
    Orchard.ContentManagement.ContentItem contentItem = Model.ContentPart.ContentItem;
    var bodyHtml = new HtmlString(Model.Html.ToString());
}

<p>@bodyHtml</p>

这篇关于我可以让Orchard在博客列表中显示整个博客帖子吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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