DynamicContent: different between Visible and ApprovalWorkfl

Posted by Community Admin on 04-Aug-2018 11:17

DynamicContent: different between Visible and ApprovalWorkflowState properties

All Replies

Posted by Community Admin on 09-Jun-2014 00:00

Hello,

How would the data returned using this:

listOfDynamicContentItems.Where(x => x.Visible == true);

differ to this:

listOfDynamicContentItems.Where(x => x.ApprovalWorkflowState = "Published");

Thank you, Michael

Posted by Community Admin on 11-Jun-2014 00:00

Hello Michael,

If you filter the dynamic content items or any content item by their ApprovalWorkflowState property as following:

listOfDynamicContentItems.Where(x => x.ApprovalWorkflowState = "Published");

you will get both the master version of the content item which is not visible on the frontend and the live version - which is visible on the frontend.

If you would like to get only the published live version of the items you need to filter the items as following:

listOfDynamicContentItems.Where(x => x.Visible &&  x.ApprovalWorflowState == "Published");

You may also refer to the following documentation articles for more details on content lifecycle and types of statuses:
  1. Types of statuses
  2. Content Lifecycle

Regards,
Sabrie Nedzhip
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