0

I try to do multilingual version of my website in Kentico CMS. In one webpart I have CMSRepeater:

<cms:CMSRepeater ID="rptProducts" runat="server"
                     Path="/Products/%" 
                     ClassNames="MyWeb.ProductRestaurant" 
                     TransformationName="MyWeb.ProductRestaurant.ProductsList"
                     SelectOnlyPublished="false" 
                     StopProcessing="true"
                     ZeroRowsText="There are no products to show" />

How to make string in "ZeroRowsText" changeable? I tried to put label there and then set the value of this string in code behind using CMShelper to translate resources:

myLiteral.Text = CMS.GlobalHelper.ResHelper.GetString("RestaurantOffer.ThereAreNoProductstoShow");

but unfortunately it doesn't work. Any idea?

4

1 回答 1

1

在后面的代码中,您应该能够在 CMSRepeater 对象上设置属性:

rptProducts.ZeroRowsText = "你的文字"

于 2013-10-31T11:19:57.233 回答