I'm trying to programmatically retrieve the page metadata (keywords, page descriptions, etc.) from a document for example...
var pages = DocumentHelper.GetDocuments("CMS.MenuItem"); foreach (var page in pages) { Console.WriteLine("The keywords for {0} are {1}", page.DocumentName, ????); Console.WriteLine("The page description for {0} is {1}", page.DocumentName, ????); }
Could someone fill in the blanks for me?
That information isn't available at the document level, it's available at the node level. So you need a tree node object and check the node.GetValue("DocumentPageKeywords") to get your values.
node.GetValue("DocumentPageKeywords")
Please, sign in to be able to submit a new answer.