SaaS CMS has officially launched! Learn more now.

Get all blocks of specific category



I would like to get all the blocks of specific category. 

Editors will choose category when creating blocks in different folders by using specific block type.  Is there any better way to get the block list based on category ID/Name ?

Any help would be much appreciated. 



Apr 16, 2018 13:40

Hi Suresh

Does your solution use Episerver Find?


Apr 16, 2018 21:03

if performance is secondary here, you can recursevily travel content tree and collect all blocks with that/those specific category(-ies). code should be quite simple (walking around the tree and asking for child items). but agree with David - you should look for some better options..

Apr 16, 2018 22:04

Thanks David and Valdis for your response.


I'm currently using Alloysite for exploring this. Yes Episerver find is there in my solution. Can you please guide me how this can be done using Episerver Find ?


I'm new for Episerver, Could you please help me with the code snippet ?



Apr 17, 2018 10:57

Taking a step back what are you trying to accomplish? Can you provide a use case?

Categories are most useful on pages like press releases, so you can filter content by tags etc. 

Maybe there is an alternate more effective solution than categorizing blocks?

Apr 17, 2018 23:08
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.