Dynamic Module - Duplicate Entries - ContentLifecycleStatus.Live
Hi,
I developed a custom module "Milestones" with data type "Milestones" and singular type "Milestone". I'm then using an MVC widget to access the Milestones and display them in chronological order.
The code I use to read the items from the database:
var dynamicModuleManager = DynamicModuleManager.GetManager();
var milestoneType = TypeResolutionService.ResolveType(
"Telerik.Sitefinity.DynamicTypes.Model.Milestones.Milestone"
);
var milestones = dynamicModuleManager.GetDataItems(milestoneType).Where(c => c.Status == ContentLifecycleStatus.Live);
var milestonesSorted = from milestone
in
milestones
orderby milestone.GetValue<
decimal
>(
"Year"
)
ascending
select milestone;
Have you tried
c.Status == ContentLifecycleStatus.Live && c.Visible == true
?
Hi Steve,
I added that condition into the where clause and it had no effect on the result.
Thanks,
Stuart
Hello,
So I decided to delete the Module and try again. I recreated it and that seemed to take care of the problem. Perhaps there was some issue with my database or something... Anyway, it's fixed now.
Thanks,
Stuart
@Stuart i am facing the same issue but recreation it is not fixing my issue??
any other suggestions?