图像未从带有媒体选择器字段的内容部分出现 [英] Image not appearing from a Content Part with a Media Picker Field

查看:66
本文介绍了图像未从带有媒体选择器字段的内容部分出现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了无法显示图像外,我正在尝试实现轮播。
可以在这里找到示例 http://www.stevetaylor.me.uk/image-carousel-using-twitter-bootstrap-and-orchard-cms-projections

I am trying to achieve the carousel and have got so far except not being able to show the image. The sample can be found here http://www.stevetaylor.me.uk/image-carousel-using-twitter-bootstrap-and-orchard-cms-projections.

若要复制,请执行以下操作:

To replicate do the following:

1。创建一个新的内容类型
a。可创造的
b。添加字段
i。字段名称:图片;类型:媒体选择器;
ii。字段名称:优先级;数值字段

1.Create a new content type a. Creatable b. Add Fields i. Field Name: Image; Type: Media Picker; ii. Field Name: Priority ; Numeric Field

2。转到管理 >>内容。我希望同时看到图片网址和优先级值。

2.Go to Admin>>Content. I would expect to see both the Image Url and Priority Value. However only see the Priority Value.

3。创建一个内容类型的项目,并使用默认布局在首页上列出它们,并且仅在Priority字段为显示但没有图像。

3.Create a project of the content type and list them on the home page using the default layout and same occurs only the Priority field is showing but no image.

我正在运行1.6.1的全新安装,而没有其他模块。

I am running a fresh install of 1.6.1 with no extra modules.

推荐答案

默认情况下,摘要视图中不显示媒体选择器字段。看到对类似问题的答复:

The media picker field is not displayed in the Summary view by default. See this response to a similar question:

如何在Orchard CMS中将图像字段添加到博客文章摘要中?

简而言之,您需要将以下内容添加到您的placement.info文件中:

In short you need to add the following to your placement.info file:

<Match DisplayType="Summary">
  <Place Fields_MediaPicker="Content:1"/>
</Match>

...并显示在管理列表中,包括在管理主题放置文件中:

...and to display in admin list, include in the admin theme placement file:

<Match DisplayType="SummaryAdmin">
  <Place Fields_MediaPicker="Content:1"/>
</Match>

果园放置的文档: http://docs.orchardproject.net/Documentation/Understanding-placement-info

这篇关于图像未从带有媒体选择器字段的内容部分出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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