如何在最近博客帖子小部件中添加图像,果园CMS



在博客文章内容类型中,我有一个名为"BlogPostImage"的媒体库选择器字段。在 placement.info 中,我补充说:<Match ContentType="BlogPost"> <Match DisplayType="Summary"> <Place Fields_MediaLibraryPicker="Content:1"/> </Match> </Match>

所以图片显示在摘要页面中,我想在最近的博客小部件中显示相同的图片。怎么做?

您必须覆盖形状模板。In views\Parts.Blogs.RecentBlogPosts.cshtml

请参阅此主题的示例:https://bitbucket.org/psenechal/pjs.bootstrap一个名为BlogPostImage的MediaPickerField用于views\Content-BlogPost.Summary.cshtml

最新更新