Yes you could do this, however I would probably use Examine to do it as it would be easier (in my opinion).
You can do an examine search on the external index for everything based on it's node type alias. Then you can pass the ID's into the Umbraco.Content method to get back all the actual documents.
Get All Pages by Document Type (regardless of where the page is in the site)
Hello,
Is it possible to get all pages (in the site) by their document type? Using Umbraco 8, I can only to this if I specify a parent page first.
Thanks
Paul
Hey Paul,
Yes you could do this, however I would probably use Examine to do it as it would be easier (in my opinion).
You can do an examine search on the external index for everything based on it's node type alias. Then you can pass the ID's into the Umbraco.Content method to get back all the actual documents.
Nik
I don't know if its the right way, but I'm using DescendantsOfType from the content at root
is working on a reply...