How to get filter dynamic module by UrlName property

Posted by Community Admin on 04-Aug-2018 15:58

How to get filter dynamic module by UrlName property

All Replies

Posted by Community Admin on 10-Sep-2015 00:00

Hi team,

I am working in sitefinity 8.1.

I have creted a dynamic module and i want to get items based on the "UrlName " property.The code that i have tried is given below.

   var dynamicCasestudyItems =
dynamicModuleManager.GetDataItems(mycaseStudyType).Where(p =>
p.Status.Equals(ContentLifecycleStatus.Live) &&
p.Visible.Equals(true) &&
p.UrlName.Equals(mycaseStudyUrl)).FirstOrDefault();

 

But i am getting the following error.Any idea on this?

Unknown parameter.
Parameter name: parameterExpression
Actual value was p.

Please let me know what i am wrong with my code.

 

Thanks

Posted by Community Admin on 12-Oct-2015 00:00

Hi,

Would it be possible for you to check whether mycaseStudyUrl is a string value?

Regards,
Stefani Tacheva
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed