How to get folder inside all folders

raj k asked on January 21, 2015 13:12

In kentico 8 it is working var documents = DocumentHelper.GetDocuments("CMS.Floder") .OnSite("CorporateSite") .InCategory("Development");

but in kentico 7.0.51 is not working please suggest me.

Recent Answers


Brenden Kehren answered on January 21, 2015 13:45

v7 does not have the object/document query like v8 does. Here are some API Examples for v7 regarding managing documents.

2 votesVote for this answer Mark as a Correct answer

Dawid Jachnik answered on January 21, 2015 13:48

CategoryInfo ci = CategoryInfoProvider.GetCategoryInfo("Development", "CorporateSite");
string where = CategoryInfoProvider.GetCategoryDocumentsWhereCondition(ci, true);
TreeProvider tree = new TreeProvider(CMSContext.CurrentUser);
var documents = DocumentHelper.GetDocuments("CorporateSite", "/%", TreeProvider.ALL_CULTURES, false, "CMS.Folder", where, null, -1, true, tree);

something like this should work for you ;)

4 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.