Question

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?

Was it helpful?

Solution

In code behind you should be able to set the property on the CMSRepeater object:

rptProducts.ZeroRowsText = "Your text"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top