0

I have a document library with a custom content type that inherits a document item. I remove the default content type.

I have a search webpart in which I want to list down all the folders available. I am currently using the Content Type as my query. I can see the files but not the folders using ContentType="NameofMyCT". I know that by using IsDocument, I can hide the non-folder, but my question is why are my folders not showing? By default, I know SP Search Result will show folders.

1 Answer 1

0

I don't think the folder's CT is the same as your document's CT. If you're restricting by only the document CT then the folders won't be included in the results. You could restrict your search to just that document library and you should get both.

1
  • Pretty weird because I can tag properties on folder level. This should mean that the folder itself is using the same CT right?
    – Joe
    Commented Aug 17, 2014 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.