In my view/cshtml file I want to extract the category names in a block.
var categoryCurrentBlock = (ICategorizable)currentBlock;
I use the above to get a list of categories in my block. How do I access the names of the categories? To use in my view
Inject the CategoryRepository and you can get the Category class by the id of the item stored in the CategoryList on the block.