Reading documents list

Posted by Community Admin on 03-Aug-2018 12:09

Reading documents list

All Replies

Posted by Community Admin on 26-Jan-2011 00:00

Hi

How can the list of documents retrieved from a specific library via code in for the purpose of displaying the documents in a custom widget?

Thanks

Regards

Posted by Community Admin on 26-Jan-2011 00:00

Hi John,

You can use the fluent API.

App.WorkWith().Documents().Where(d => d.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live).Get().ToList();

Please take a look at Media Modules

Regards,
Ivan Dimitrov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 26-Jan-2011 00:00

Hi

Many thanks.

This one is bringing all the documents from all libraries. Any way to restrict the returned documents from "staff documents" library only?

Also is there a way to read user friendly document filename from library or the only way is to extract file name from Media Url field?

Thanks

Regards

Posted by Community Admin on 31-Jan-2011 00:00

Hi John,

You can add an condition in the Where statement

&& d =>d.Title == "test"

You can use all Document properties inside the Where query.

Kind regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed