dynamicModuleManager.GetDataItems Where LString value is...
When I'm getting a string value from a dynamic content type in SF 8, I can use the following line:
item.ItemDefaultUrl.GetString(new CultureInfo("en"), false);However, I can't use the same snipped in the "Where" clause of the DynamicModuleManager.GetDataItems() function:
dynamicModuleManager.GetDataItems(careerType) .Where( i => i.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live && i.Visible == true && i.ItemDefaultUrl.GetString(new CultureInfo("en"), false) == "/"+actionName ).First();The latter snipped yields this message:
Method 'GetString' is not supported on the 'Telerik.Sitefinity.Model.Lstring' type.Turns out this works:
dynamicModuleManager.GetDataItems(careerType) .Where( i => i.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live && i.Visible == true && i.ItemDefaultUrl == "/"+actionName ).First();