【发布时间】:2013-12-06 16:19:09
【问题描述】:
我的文档类型 Product 包含以下字段:图像和文本。我想使用显示所有文档产品的 CMS 转发器将 webpart 添加到 kentico,但我只想显示包含图像的文档(不需要字段图像)。我添加了一行
WhereCondition="图像不为空"
到 cmsrepeater 并在我的本地计算机上运行 - 我只能看到带有图像的项目。但是当我将文件移动到暂存时,这是一个问题,我可以看到应该是图像的空白位置,所以我的方法不起作用,但我不知道为什么......有什么想法吗?
我所有的代码:
<cms:CMSRepeater ID="rptProducts" runat="server" Path="/Products/%" ClassNames="Products.Item" TransformationName="Product.ProductList" SelectOnlyPublished="true" StopProcessing="true" PagerControl-PageSize ="4" PagerControl-PageNumbersSeparator="" PagerControl-BackNextStyle="display:none;" EnablePaging="true" ZeroRowsText='<%# CMS.GlobalHelper.ResHelper.GetString("ZeroRowsText") %>' WhereCondition="Image is not null" />
我检查过,我的暂存站点没有缓存,所有文件都正确。
【问题讨论】:
-
只是一个长镜头,但你可以尝试检查一个空字符串... ISNULL(Image, '') ''
标签: c# asp.net webforms kentico