Using the native API, I am able to retrieve values from custom fields in a blog post using
DataExtensions.GetValue(dataItem, fieldName). My question is, how can I get the associated label for this fieldname? For example, In a blog post, I have a custom field named "question1". The label for question1 is "Name an animal with 4 legs". So using the GetValue extension method, I can get the value for this question, but how do I programmatically get the "Name an animal with 4 legs" part of question1? Please advise using native API syntax.
Here's some simplified example code:
BlogsManager blogsManager = BlogsManager.GetManager();
// get all published blogs items
var allBlogs = blogsManager.GetBlogPosts().Where(b => b.Status == ContentLifecycleStatus.Live).ToList();