I'm doing an episerver find indexing job where I want to take all blocks of type PersonBlock and create a new object which will be searchable. To save it to the index i need the blocks Id which I could get if i casted the blocktype to IContent but for some reason it's not working?
I've read this post already: http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=77662&epslanguage=en which claims that it's not possible to cast it to IContent if it's a local block but this block is never used as a local block.
Maybe this has something to do with how i retrieve all my blocks
If so, I'm all ears how I can retrieve all my blocks of this type in a different way
Have you tried GetContent() instead?
That worked. Thanks!