Try our conversational search powered by Generative AI!

Hot to get Localized block description from within a block view.


I might be stupid but I can't figure out how I can get the LocalizedDescription for a block inside a view.

I'm using forms.

Probably easy but I need help.

Apr 11, 2013 8:59

I solved by adding a method to the views generic baseclass. But there must be a better way.


public string Desc()
var repository = ServiceLocator.Current.GetInstance<IContentTypeRepository>();
var blockrepository = new BlockTypeRepository(repository);
string slask = blockrepository.Load<T>().LocalizedDescription;
return slask;

Apr 11, 2013 10:43
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.